/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', 'Noto Sans SC', sans-serif;
    line-height: 1.6;
    color: #333;
    scroll-behavior: smooth;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏 */
.navbar {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo h2 {
    color: #4a6cf7;
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li a {
    text-decoration: none;
    color: #333;
    padding: 15px 20px; /* 增加内边距，让触摸区域更大 */
    transition: color 0.3s;
    font-size: 1.1rem; /* 稍微增大字体 */
}

.nav-menu li a:hover {
    color: #4a6cf7;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    margin: 3px 0;
    background: #333;
    transition: 0.3s;
}

/* 英雄区 */
.hero {
    background: linear-gradient(135deg, #4a6cf7, #6a11cb);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.hero-container h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.hero-container p {
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.cta-buttons {
    margin-top: 30px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    margin: 0 10px;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s;
    font-weight: bold;
}

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

.btn-primary:hover {
    background: #f0f0f0;
    transform: translateY(-3px);
}

.btn-secondary {
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-3px);
}

/* 服务部分 */
.services {
    padding: 100px 0;
    background: #f8f9fa;
}

.services h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    color: #333;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: #fff;
    padding: 40px 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s;
}

.service-card:hover {
    transform: translateY(-10px);
}

.icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #4a6cf7;
}

/* 特色功能 */
.features {
    padding: 100px 0;
    background: #fff;
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    color: #333;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-item {
    text-align: center;
    padding: 30px;
}

.feature-item h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #4a6cf7;
}

/* 演示区 */
.demo {
    padding: 100px 0;
    background: #f8f9fa;
}

.demo h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    color: #333;
}

.demo-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.demo-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #4a6cf7;
}

.btn-demo {
    display: inline-block;
    margin-top: 20px;
    background: #4a6cf7;
    color: white;
}

.btn-demo:hover {
    background: #3a5ce5;
}

.demo-image {
    flex: 1;
}

.placeholder-image {
    background: #e9ecef;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 1.2rem;
    color: #6c757d;
}

/* 相关站点 */
.related-sites {
    padding: 100px 0;
    background: #fff;
}

.related-sites h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    color: #333;
}

.sites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.site-card {
    background: #f8f9fa;
    padding: 40px 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s;
}

.site-card:hover {
    transform: translateY(-10px);
}

.site-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #4a6cf7;
}

.btn-site {
    display: inline-block;
    margin-top: 20px;
    background: #4a6cf7;
    color: white;
    text-decoration: none;
    padding: 10px 25px;
    border-radius: 5px;
    transition: background 0.3s;
}

.btn-site:hover {
    background: #3a5ce5;
}

/* 联系我们 */
.contact {
    padding: 100px 0;
    background: #f8f9fa;
}

.contact h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    color: #333;
}

.contact-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 50px;
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #4a6cf7;
}

.contact-info ul {
    list-style: none;
    margin-top: 20px;
}

.contact-info li {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.btn-submit {
    background: #4a6cf7;
    color: white;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.btn-submit:hover {
    background: #3a5ce5;
}

/* 页脚 */
.footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 30px 0;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .hamburger {
        display: flex;
        padding: 15px; /* 增加汉堡菜单按钮的触摸区域 */
        margin: 0 10px; /* 给汉堡菜单增加一些边距 */
    }

    .bar {
        width: 28px; /* 稍微减小汉堡菜单条的宽度 */
        height: 3px; /* 稍微减小汉堡菜单条的高度 */
        margin: 4px 0; /* 稍微减小条之间的间距 */
    }

    .nav-menu {
        position: fixed;
        right: -100%; /* 从右边隐藏 */
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 80%; /* 减少菜单宽度，不再是全屏宽度 */
        max-width: 300px; /* 设置最大宽度，防止在平板上过宽 */
        text-align: center;
        transition: 0.3s;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1); /* 调整阴影方向 */
        z-index: 1001; /* 确保菜单在顶层 */
    }

    .nav-menu li {
        border-bottom: 1px solid #eee; /* 添加分隔线，便于区分每个导航项 */
    }
    
    .nav-menu li:last-child {
        border-bottom: none; /* 最后一个元素不需要底部边框 */
    }

    .nav-menu li a {
        display: block; /* 确保链接占据整行 */
        padding: 16px 15px; /* 适度减少导航项的内边距 */
        font-size: 1.1rem; /* 稍微减小字体大小 */
        margin: 0; /* 确保链接占满整个列表项 */
    }

    .nav-menu.active {
        right: 0; /* 从右边滑入显示 */
        left: auto;
    }

    .hero-container h1 {
        font-size: 2.5rem;
    }

    .hero-container p {
        font-size: 1.2rem;
    }

    .demo-content {
        flex-direction: column;
    }

    .sites-grid {
        grid-template-columns: 1fr;
    }
    
    /* 针对移动设备优化按钮大小 */
    .btn {
        padding: 16px 30px; /* 适度减少按钮的触摸区域 */
        margin: 8px 5px;
        font-size: 1.0rem; /* 稍微减小按钮文字 */
        min-height: 44px; /* 适度减小按钮最小高度 */
    }
    
    /* 优化联系表单输入框 */
    .form-group input,
    .form-group textarea {
        padding: 15px; /* 适度减少输入框触摸区域 */
        font-size: 1.0rem; /* 稍微减小输入框文字 */
        min-height: 46px; /* 适度减小输入框最小高度 */
    }
    
    /* 优化服务卡片按钮 */
    .btn-site {
        padding: 16px 25px; /* 适度减少按钮触摸区域 */
        font-size: 1.0rem; /* 稍微减小按钮文字 */
        min-height: 44px; /* 适度减小按钮最小高度 */
    }
    
    /* 优化特色功能项 */
    .feature-item {
        padding: 20px 15px; /* 调整移动端特色功能项的内边距 */
    }
    
    /* 优化服务卡片 */
    .service-card {
        padding: 25px 20px; /* 调整移动端服务卡片的内边距 */
    }
}