
/* 全局样式设置，包含字体、背景和基本布局 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #1e3c72 70%, #2a5298 25%, #ff7e5f 5%);
    color: #333;
    line-height: 1.6;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(30, 60, 114, 0.9);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 导航项样式 */
.nav-item {
    position: relative;
    margin: 0 15px;
}

.nav-item a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s;
}

.nav-item a:hover {
    color: #feb47b;
}

/* 下拉菜单样式 */
.dropdown {
    display: none;
    position: absolute;
    top: 40px;
    left: 0;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    min-width: 150px;
}

.dropdown a {
    padding: 10px 20px;
    display: block;
    color: #333;
    text-decoration: none;
    transition: background 0.3s;
}

.dropdown a:hover {
    background: #f1f1f1;
}

/* 导航项悬停显示下拉菜单 */
.nav-item:hover .dropdown {
    display: block;
}

/* Hero区样式 */
.hero {
    height: 100vh;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: white;
    text-align: center;
    padding: 0 20px;
}

.brand-slogan {
    font-family: 'Roboto Bold', sans-serif;
    font-size: 32px;
    background: linear-gradient(90deg, #ff7e5f, #feb47b);
    -webkit-background-clip: text;
    color: transparent;
    margin-bottom: 20px;
}

.cta-button {
    padding: 15px 30px;
    font-family: 'Roboto Bold', sans-serif;
    font-size: 18px;
    color: white;
    background: linear-gradient(45deg, #6a11cb, #2575fc);
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.cta-button:hover {
    background: linear-gradient(45deg, #2575fc, #6a11cb);
    transform: translateY(-5px);
}

/* 主要内容区域 */
main {
    padding: 100px 50px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

/* 服务展示区样式 */
.services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 50px 0;
    background-color: #f5f5f5;
}

.service-card {
    background: linear-gradient(135deg, #ffffff, #e0e0e0);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.service-card:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.service-card img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.service-card img:hover {
    transform: rotate(10deg);
}

.service-card h3 {
    font-size: 18px;
    margin: 15px 0;
    color: #333;
}

.service-card p {
    font-size: 15px;
    color: #666;
}

/* 代码块样式 */
pre code {
    display: block;
    padding: 20px;
    background: #2d2d2d;
    color: #ccc;
    border-radius: 5px;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
}

pre code::before {
    content: "CSS3 示例代码";
    position: absolute;
    top: -20px;
    left: 0;
    background: #6a11cb;
    color: #fff;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 12px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .services {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .brand-slogan {
        font-size: 24px;
    }

    .cta-button {
        width: 100%;
        text-align: center;
    }

    main {
        grid-template-columns: 1fr;
    }
}

/* 过渡效果与动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-section {
    animation: fadeInUp 1s ease-out;
}

/* 图片样式 */
img.decorative {
    width: 320px;
    height: 320px;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

img.decorative:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

/* 文章内容区域 */
article {
    max-width: 800px;
    margin: 0 auto;
}

article h2, article h3, article h4 {
    color: #333;
    margin-top: 20px;
}

article p {
    font-size: 16px;
    color: #555;
}

.article-code {
    margin: 20px 0;
}

.article-code code {
    background: #f5f5f5;
    padding: 2px 4px;
    border-radius: 3px;
}

/* 提示信息样式 */
.reference-note {
    background: #ffeb3b;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
    margin: 20px 0;
}

.nav-items {
	width: 600px;
}

.nav-items .nav-item {
	float:left;
}
