
/* 全局样式设置 */
body {
    background: linear-gradient(135deg, #1E3A8A, #3B82F6); /* 渐变背景，深蓝到浅蓝 */
    font-family: 'Roboto', sans-serif; /* 使用Roboto字体，保证可读性 */
    color: #ffffff; /* 全局字体颜色为白色 */
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow-x: hidden; /* 避免出现水平滚动条 */
}

/* 导航栏样式 */
.navbar {
    position: fixed; /* 固定导航栏 */
    top: 0;
    width: 100%;
    background-color: rgba(30, 58, 138, 0.9); /* 半透明深蓝色背景 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px; /* 内边距 */
    z-index: 1000; /* 确保在最上层 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 阴影效果，增加立体感 */
}

.navbar .logo {
    font-size: 1.5em;
    color: #FFFFFF;
    text-decoration: none;
}

.navbar .menu {
    display: flex;
    gap: 15px; /* 菜单项之间的间距 */
}

.navbar .menu a {
    color: #FFFFFF;
    text-decoration: none;
    transition: color 0.3s; /* 颜色过渡效果 */
}

.navbar .menu a:hover {
    color: #F97316; /* 悬停时变为橙色 */
}

.navbar .search-box {
    background-color: #FFFFFF;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 1em;
}

/* 主体内容的上边距，避免被固定导航栏遮挡 */
.main-content {
    margin-top: 70px;
}

/* 英雄区样式 */
.hero {
    height: 100vh;
    background-image: url('https://images.gptkong.com/demo/sample1.png'); /* 背景图 */
    background-size: cover;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #FFFFFF;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 58, 138, 0.6); /* 半透明覆盖层 */
}

.hero .tagline {
    font-size: 2.5em;
    margin-bottom: 20px;
    animation: fadeIn 2s ease-in-out; /* 淡入动画 */
}

.hero .cta-button {
    background-color: #F97316;
    border: none;
    padding: 15px 30px;
    font-size: 1em;
    color: #FFFFFF;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s; /* 颜色和缩放过渡效果 */
}

.hero .cta-button:hover {
    background-color: #EA580C;
    transform: scale(1.05); /* 悬停时微缩放 */
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.bubbles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.bubble {
    position: absolute;
    bottom: -100px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    animation: floatUp 10s linear infinite; /* 浮动动画 */
}

.bubble:nth-child(1) {
    width: 40px;
    height: 40px;
    left: 20%;
    animation-delay: 0s;
}

.bubble:nth-child(2) {
    width: 60px;
    height: 60px;
    left: 50%;
    animation-delay: 2s;
}

.bubble:nth-child(3) {
    width: 30px;
    height: 30px;
    left: 80%;
    animation-delay: 4s;
}

@keyframes floatUp {
    from { transform: translateY(0); opacity: 1; }
    to { transform: translateY(-100vh); opacity: 0; }
}

/* 服务介绍区样式 */
.services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr)); /* 最小宽度500px，响应式网格 */
    gap: 40px; /* 网格间距 */
    padding: 50px 20px;
    background-color: rgba(255, 255, 255, 0.1); /* 半透明背景 */
}

.service-item {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s, background-color 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* 阴影效果 */
}

.service-item:hover {
    transform: translateY(-10px); /* 悬停时上浮 */
    background-color: rgba(255, 255, 255, 0.3);
}

.service-item img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 15px;
}

.service-item h3 {
    font-size: 1.8em;
    margin-bottom: 10px;
}

.service-item p {
    font-size: 1em;
    line-height: 1.5;
}

/* 案例展示区样式 */
.case-studies {
    padding: 50px 20px;
    background-color: rgba(30, 58, 138, 0.8); /* 深蓝色半透明背景 */
    position: relative;
    overflow: hidden;
}

.case-container {
    display: flex;
    gap: 20px;
    overflow-x: scroll;
    scroll-snap-type: x mandatory;
}

.case-card {
    flex: 0 0 500px; /* 固定宽度500px */
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    scroll-snap-align: start;
    transition: transform 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* 阴影效果 */
}

.case-card:hover {
    transform: scale(1.05); /* 悬停时放大 */
}

.case-card img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 15px;
}

.case-card h4 {
    font-size: 1.5em;
    margin-bottom: 10px;
}

.case-card p {
    font-size: 1em;
    line-height: 1.4;
}

/* 联系我们区样式 */
.contact {
    padding: 50px 20px;
    background-color: rgba(255, 255, 255, 0.1); /* 半透明背景 */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact form {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 30px;
    border-radius: 10px;
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* 阴影效果 */
}

.contact form input,
.contact form textarea {
    background-color: rgba(255, 255, 255, 0.3);
    border: none;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 5px;
    color: #FFFFFF;
    font-size: 1em;
}

.contact form input:focus,
.contact form textarea:focus {
    outline: none;
    box-shadow: 0 0 5px #F97316; /* 聚焦时的阴影效果 */
}

.contact form button {
    background-color: #F97316;
    border: none;
    padding: 10px;
    border-radius: 5px;
    color: #FFFFFF;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 1em;
}

.contact form button:hover {
    background-color: #EA580C;
}

.ai-chat {
    margin-top: 20px;
    background-color: #F97316;
    color: #FFFFFF;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    animation: pulse 2s infinite; /* 脉动动画 */
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* 代码块样式 */
pre {
    background-color: rgba(0, 0, 0, 0.8); /* 深色背景 */
    padding: 15px;
    border-radius: 5px;
    overflow: auto;
    margin: 20px 0;
}

code {
    color: #F97316; /* 代码颜色为橙色 */
    font-family: 'Courier New', Courier, monospace;
    font-size: 1em;
}

code::before {
    content: 'CSS3代码示例: ';
    color: #FFFFFF;
    font-weight: bold;
}

pre code {
    overflow: visible; /* 防止before样式被遮挡 */
}

/* 折叠区域样式 */
.collapsible {
    background-color: rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
    cursor: pointer;
    padding: 18px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 1.2em;
    transition: background-color 0.3s;
    border-radius: 5px;
    margin: 10px 0;
}

.collapsible:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.content {
    padding: 0 18px;
    display: none;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    margin-bottom: 10px;
}

.content p {
    margin: 10px 0;
    line-height: 1.6;
    font-size: 1em;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar .menu {
        flex-direction: column;
        gap: 10px;
    }
    .services {
        grid-template-columns: 1fr; /* 单列布局 */
    }
    .case-container {
        flex-direction: column;
    }
    .case-card {
        flex: 0 0 100%;
    }
}

