/* 国力化工 - 首页专属样式 (AI服务区/统计/关于/CTA) */
/* 从 template/cms/default/index.html 提取 */

/* AI智能服务区域样式 */
.ai-service-section{
    min-height: 90vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 80px 20px;
    position: relative;
}

.ai-service-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%233b82f6' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.ai-service-container{
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 60px;
    align-items: flex-start;
}

/* 左侧功能展示 */
.ai-service-left {
    padding-right: 20px;
}

.ai-service-header {
    margin-bottom: 50px;
}

.ai-service-header h1 {
    font-size: 48px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 20px;
    line-height: 1.2;
}

.ai-service-header p {
    font-size: 18px;
    color: #a0aec0;
    line-height: 1.8;
}

.ai-features-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.ai-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 25px;
    background: rgba(26, 26, 46, 0.6);
    border-radius: 15px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    transition: all 0.3s;
}

.ai-feature-item:hover {
    background: rgba(26, 26, 46, 0.9);
    border-color: #3b82f6;
    transform: translateX(10px);
}

.ai-feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ai-feature-icon i {
    font-size: 24px;
    color: #fff;
}

.ai-feature-text h3 {
    font-size: 20px;
    color: #fff;
    margin-bottom: 8px;
}

.ai-feature-text p {
    font-size: 14px;
    color: #a0aec0;
    line-height: 1.6;
    margin: 0;
}

/* 右侧AI对话框 */
.ai-service-right {
    display: flex;
    justify-content: center;
}

.ai-chat-container {
    width: 100%;
    max-height: 70vh;
    height: 900px;
    background: rgba(26, 26, 46, 0.95);
    border-radius: 20px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
}

.ai-chat-header-bar {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-header-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ai-header-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.ai-header-info h3 {
    color: #fff;
    font-size: 18px;
    margin: 0 0 5px 0;
}

.ai-status-badge {
    background: rgba(16, 185, 129, 1);
    color: #fff;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.ai-chat-messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 25px;
    background: #0a0a0a;
}

/* Markdown内容样式 */
.ai-markdown-content {
    color: #e5e5e5;
    line-height: 1.6;
}

.ai-markdown-content h1,
.ai-markdown-content h2,
.ai-markdown-content h3 {
    color: #fff;
    margin: 15px 0 10px 0;
    font-weight: 600;
}

.ai-markdown-content h1 {
    font-size: 20px;
    border-bottom: 2px solid rgba(59, 130, 246, 0.3);
    padding-bottom: 8px;
}

.ai-markdown-content h2 {
    font-size: 18px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    padding-bottom: 5px;
}

.ai-markdown-content h3 {
    font-size: 16px;
}

.ai-markdown-content p {
    margin: 10px 0;
}

.ai-markdown-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    background: rgba(26, 26, 46, 0.8);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    overflow: hidden;
}

.ai-markdown-content table thead {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.ai-markdown-content table th {
    padding: 12px 15px;
    text-align: left;
    color: #fff;
    font-weight: 600;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.ai-markdown-content table td {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    color: #e5e5e5;
}

.ai-markdown-content table tbody tr:hover {
    background: rgba(59, 130, 246, 0.1);
}

.ai-markdown-content table tbody tr:last-child td {
    border-bottom: none;
}

.ai-markdown-content ul,
.ai-markdown-content ol {
    padding-left: 25px;
    margin: 10px 0;
}

.ai-markdown-content li {
    margin: 5px 0;
}

.ai-markdown-content ul li::marker {
    color: #3b82f6;
}

.ai-markdown-content ol li::marker {
    color: #3b82f6;
    font-weight: 600;
}

.ai-markdown-content code {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.ai-markdown-content pre {
    background: rgba(10, 10, 10, 0.8);
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 10px 0;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.ai-markdown-content pre code {
    background: transparent;
    padding: 0;
    color: #e5e5e5;
}

.ai-markdown-content blockquote {
    border-left: 4px solid #3b82f6;
    padding-left: 15px;
    margin: 10px 0;
    color: #a0aec0;
    font-style: italic;
    background: rgba(59, 130, 246, 0.05);
    padding: 10px 15px;
    border-radius: 0 8px 8px 0;
}

.ai-markdown-content a {
    color: #60a5fa;
    text-decoration: underline;
    transition: color 0.3s;
}

.ai-markdown-content a:hover {
    color: #93c5fd;
}

.ai-markdown-content hr {
    border: none;
    border-top: 1px solid rgba(59, 130, 246, 0.3);
    margin: 20px 0;
}

.ai-message {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.ai-assistant-message {
    flex-direction: row;
}

.ai-user-message {
    flex-direction: row-reverse;
}

.ai-user-message .ai-message-bubble {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-bottom-right-radius: 6px;
}

.ai-user-message .ai-message-bubble p {
    color: white;
}

.ai-message-avatar-small {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ai-user-avatar {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.ai-user-avatar svg {
    width: 20px;
    height: 20px;
}

.ai-loading-dots {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
}

.ai-loading-dot {
    width: 8px;
    height: 8px;
    background: #3b82f6;
    border-radius: 50%;
    animation: loading-bounce 1.4s infinite ease-in-out both;
}

.ai-loading-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.ai-loading-dot:nth-child(2) {
    animation-delay: -0.16s;
}

.ai-loading-dot:nth-child(3) {
    animation-delay: 0s;
}

@keyframes loading-bounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.ai-message-bubble {
    background: #1a1a2e;
    padding: 15px 20px;
    border-radius: 15px;
    max-width: 85%;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.ai-message-bubble p {
    color: #e5e5e5;
    line-height: 1.6;
    margin: 0 0 10px 0;
    font-size: 15px;
}

.ai-message-bubble p:last-child {
    margin-bottom: 0;
}

.ai-feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.ai-feature-tag {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.ai-chat-input-area {
    padding: 20px 25px;
    background: #1a1a2e;
    border-top: 1px solid rgba(59, 130, 246, 0.2);
}

.ai-chat-input-wrapper {
    display: flex;
    gap: 10px;
    background: #0a0a0a;
    border-radius: 25px;
    padding: 8px 8px 8px 20px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    transition: border-color 0.3s;
}

.ai-chat-input-wrapper:focus-within {
    border-color: #3b82f6;
}

.ai-chat-input-wrapper textarea {
    flex: 1;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 15px;
    resize: none;
    outline: none;
    padding: 8px 0;
    line-height: 1.5;
}

.ai-chat-input-wrapper textarea::placeholder {
    color: #6b7280;
}

.ai-send-button {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    flex-shrink: 0;
}

.ai-send-button:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: scale(1.05);
}

.ai-send-button i {
    font-size: 18px;
}

.ai-input-hint-text {
    text-align: center;
    font-size: 12px;
    color: #6b7280;
    margin-top: 10px;
}

/* 自定义滚动条样式 */
.ai-chat-messages::-webkit-scrollbar {
    width: 8px;
}

.ai-chat-messages::-webkit-scrollbar-track {
    background: rgba(10, 10, 10, 0.5);
    border-radius: 4px;
}

.ai-chat-messages::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 4px;
}

.ai-chat-messages::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}

/* Firefox滚动条样式 */
.ai-chat-messages {
    scrollbar-width: thin;
    scrollbar-color: #3b82f6 rgba(10, 10, 10, 0.5);
}

/* 响应式调整 */
@media (max-width: 992px) {
    .ai-service-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .ai-service-header h1 {
        font-size: 36px;
    }

    .ai-service-left {
        padding-right: 0;
    }

    .ai-chat-messages {
        height: 300px;
    }
}

@media (max-width: 576px) {
    .ai-service-header h1 {
        font-size: 28px;
    }

    .ai-feature-item {
        padding: 20px;
    }

    .ai-feature-icon {
        width: 50px;
        height: 50px;
    }

    .ai-feature-icon i {
        font-size: 20px;
    }
}

/* 各展示区差异化颜色样式 */
.stats{
    background: linear-gradient(180deg, #3d2a5a 0%, #5a3d7a 100%);
    padding: 60px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.stat-item{
    text-align: center;
    padding: 30px 20px;
    background: rgba(90, 61, 122, 0.5);
    border-radius: 15px;
    border: 1px solid rgba(120, 80, 160, 0.3);
    transition: all 0.3s;
}

.stat-item:hover {
    transform: translateY(-5px);
    background: rgba(120, 80, 160, 0.5);
    border-color: rgba(59, 130, 246, 0.3);
}

.stat-num {
    font-size: 48px;
    font-weight: bold;
    color: #3b82f6;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 16px;
    color: #a0aec0;
}

/* 关于我们区域 - 紫绿渐变 */
.about-section {
    background: linear-gradient(135deg, #5a3d7a 0%, #3d7a6e 100%);
    padding: 80px 0;
}

/* 产品展示区域 - 深紫到蓝色渐变 */
.section[style*="var(--bg-light)"] {
    background: linear-gradient(180deg, #3d2a5a 0%, #5a3d7a 50%, #3d2a5a 100%) !important;
}

/* CTA区域 - 纯深紫色 */
.cta-section {
    background: linear-gradient(180deg, #3d2a5a 0%, #2d1a4a 100%);
    padding: 80px 0;
}
