/* 基础重置和全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    overflow: hidden;
}

/* 头部样式 */
header {
    background: #ffffff;
    color: #333;
    padding: 0.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.logo {
    margin: 0;
    margin-right: 5rem; /* 增加Logo右侧间距，避免与导航栏过于接近 */
}

.logo a {
    display: inline-block;
    color: #333;
    text-decoration: none;
}

.logo img {
    height: 65px;
    width: 230px;
    vertical-align: middle;
    object-fit: contain;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    flex-grow: 1;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li {
    margin-left: 1.5rem;
}

.nav-menu a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.nav-menu a:hover,
.nav-menu a.active {
    background-color: #f0f0f0;
    color: #1a2a6c;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* 主要内容区域 */
main {
    min-height: calc(100vh - 120px);
}

/* 英雄区域 */
.hero {
    background: #ffffff;
    color: #333;
    text-align: center;
    padding: 3rem 0;
    border-bottom: 1px solid #eee;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #1a2a6c;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    color: #666;
}

.btn-primary {
    display: inline-block;
    background: #1a2a6c;
    color: white;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s, transform 0.2s;
    border: 2px solid #1a2a6c;
}

.btn-primary:hover {
    background: #2a5298;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* 分类区域 */
.categories {
    padding: 2rem 0;
    background-color: #ffffff;
}

.categories h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: #1a2a6c;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    justify-items: center;
}

.category-card {
    background: #ffffff;
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    text-decoration: none;
    color: #333;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    width: 100%;
    max-width: 300px;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.category-image {
    width: 100%;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.category-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #1a2a6c;
}

.category-card p {
    color: #666;
    flex-grow: 1;
}

/* 特性区域 */
.features {
    padding: 2rem 0;
    background-color: #ffffff;
}

.features h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: #1a2a6c;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: #ffffff;
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #1a2a6c;
}

/* 软件卡片样式 */
.software-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 3rem 0;
}

.software-card {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.software-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.software-image {
    height: 180px;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.software-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.software-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.software-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #1a2a6c;
}

.software-info p {
    color: #666;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.software-info .buttons {
    margin-top: auto;
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: center;
}

.btn-download {
    display: inline-block;
    background: #1a2a6c;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s;
    border: none;
    cursor: pointer;
    flex: 0 0 auto;
    font-size: 0.9rem;
    white-space: nowrap;
}

.btn-download:hover {
    background: #2a5298;
    color: white;
    text-decoration: none;
}

.btn-tutorial {
    background-color: #4CAF50;
    color: white;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    white-space: nowrap;
}

.btn-video {
    background-color: #2196F3;
    color: white;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* 确保按钮在小屏幕上也能正常显示 */
@media screen and (max-width: 768px) {
    .btn-download {
        margin-right: 5px;
        margin-bottom: 5px;
        padding: 5px 10px;
        font-size: 0.85rem;
    }
    
    .btn-tutorial,
    .btn-video {
        padding: 5px 10px;
        font-size: 0.85rem;
    }
}

/* 关于我们区域 */
.about-section {
    padding: 3rem 0;
    background-color: #ffffff;
    border-bottom: 1px solid #eee;
}

.about-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #1a2a6c;
}

.about-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.about-text {
    max-width: 800px;
    text-align: center;
}

.about-text p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* 售后服务区域 */
.service-section {
    padding: 3rem 0;
    background-color: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.service-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #1a2a6c;
}

.service-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.service-list {
    list-style-type: disc;
    padding-left: 1.5rem;
}

.service-list li {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.contact-info {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
}

.contact-info p {
    margin-bottom: 0.5rem;
}

/* 合作与增值服务区域 */
.cooperation-section {
    padding: 3rem 0;
    background-color: #ffffff;
    border-bottom: 1px solid #eee;
}

.cooperation-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #1a2a6c;
}

.cooperation-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.cooperation-content p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* 软件开发原则区域 */
.principles-section {
    padding: 3rem 0;
    background-color: #f8f9fa;
}

.principles-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #1a2a6c;
}

.principles-content {
    max-width: 1000px;
    margin: 0 auto;
}

.principles-list {
    list-style-type: disc;
    padding-left: 1.5rem;
}

.principles-list li {
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* 软件详情页面样式 */
.software-detail {
    padding: 3rem 0;
    background-color: #ffffff;
}

.detail-header {
    text-align: center;
    margin-bottom: 3rem;
}

.detail-header h1 {
    font-size: 2.5rem;
    color: #1a2a6c;
    margin-bottom: 1rem;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

.detail-image {
    height: 300px;
    background-color: #f8f9fa;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
    margin-bottom: 2rem;
}

.detail-description {
    margin-bottom: 2rem;
}

.detail-description h2 {
    color: #1a2a6c;
    margin-bottom: 1rem;
}

.sidebar {
    background: #ffffff;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
    align-self: start;
}

.sidebar h3 {
    color: #1a2a6c;
    margin-bottom: 1rem;
}

.download-options {
    margin-bottom: 2rem;
}

.download-btn {
    display: block;
    background: #1a2a6c;
    color: white;
    padding: 12px;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-weight: 500;
    transition: background 0.3s;
}

.download-btn:hover {
    background: #2a5298;
}

/* 页脚 */
footer {
    background: #ffffff;
    color: #333;
    text-align: center;
    padding: 1.5rem 0;
    border-top: 1px solid #eee;
}

/* 分类页面样式 */
.category-header {
    background: #ffffff;
    color: #333;
    padding: 3rem 0;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.category-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #1a2a6c;
}

.category-header p {
    color: #666;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: #ffffff;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        border-bottom: 1px solid #eee;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 1rem 0;
    }
    
    .hero {
        padding: 3rem 0;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-content {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: -1;
        margin-bottom: 2rem;
    }
    
    .service-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* 在小屏幕上减小Logo和导航栏之间的间距 */
    .logo {
        margin-right: 1rem;
    }
    
    .about-section,
    .service-section,
    .cooperation-section,
    .principles-section {
        padding: 2rem 0;
    }
    
    .about-section h2,
    .service-section h2,
    .cooperation-section h2,
    .principles-section h2 {
        font-size: 1.8rem;
    }
    
    .category-card {
        max-width: 100%;
    }
}

@media screen and (max-width: 480px) {
    .container {
        width: 95%;
    }
    
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .categories h2,
    .features h2 {
        font-size: 1.8rem;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .category-card,
    .feature-card {
        padding: 1.5rem;
    }
    
    /* 在更小的屏幕上进一步调整Logo和导航栏之间的间距 */
    .logo {
        margin-right: 0.5rem;
    }
    
    .about-section,
    .service-section,
    .cooperation-section,
    .principles-section {
        padding: 2rem 0;
    }
    
    .about-section h2,
    .service-section h2,
    .cooperation-section h2,
    .principles-section h2 {
        font-size: 1.8rem;
    }
    
    .software-grid {
        grid-template-columns: 1fr;
    }
    
    .software-card {
        max-width: 100%;
    }
    
    .software-info .buttons {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .btn-download,
    .btn-tutorial,
    .btn-video {
        padding: 4px 8px;
        font-size: 0.8rem;
    }
}