/* 全局样式 */
:root {
    --primary-color: #2C3E50; /* 深蓝色（猪的衣服颜色） */
    --secondary-color: #FFD835; /* 黄色（猪的帽子颜色） */
    --accent-color: #FF9800; /* 橙色作为强调色 */
    --text-color: #424242; /* 深灰色文本 */
    --light-bg: #FFF9F9; /* 超浅粉色背景 */
    --dark-bg: #344966; /* 深蓝偏青色 - 衣服颜色的变种 */
    --pig-color: #FFCDD2; /* 粉色（猪的皮肤颜色） */
    --white: #FFFFFF;
    --shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    --border-radius: 20px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'ZCOOL KuaiLe', '微软雅黑', sans-serif;
    color: var(--text-color);
    background-color: var(--light-bg);
    line-height: 1.6;
    opacity: 0;
    transition: opacity 1s ease;
}

body.page-loaded {
    opacity: 1;
}

a {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color);
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5rem;
    color: var(--dark-bg);
    text-shadow: 2px 2px 0 var(--secondary-color);
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 6px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
}

/* 头部样式 */
header {
    background-color: var(--white);
    padding: 15px 5%;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 5px solid var(--primary-color);
    transition: transform 0.3s ease;
}

header.scrolled {
    transform: translateY(-100%);
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-image {
    width: 60px;
    height: 60px;
    margin-right: 10px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.logo h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    text-shadow: 2px 2px 0 var(--secondary-color);
    margin: 0;
}

.slogan {
    font-size: 1rem;
    color: var(--accent-color);
    margin-top: 5px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

nav li a {
    font-size: 1.2rem;
    font-weight: bold;
    padding: 10px 15px;
    border-radius: 30px;
    position: relative;
    display: inline-block;
    z-index: 1;
}

nav li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--secondary-color);
    border-radius: 30px;
    z-index: -1;
    transform: scale(0);
    transition: transform 0.3s ease;
}

nav li a:hover::before {
    transform: scale(1);
}

/* 英雄区域样式 */
.hero {
    height: 80vh;
    background: linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.7)), url('images/hero-bg.svg');
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background-image: url('images/grass.svg');
    background-size: contain;
    background-repeat: repeat-x;
}

.hero-content {
    max-width: 800px;
    padding: 40px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 5px solid var(--primary-color);
    position: relative;
    z-index: 2;
    animation: float 4s infinite ease-in-out;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.hero-content h2 {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-shadow: 2px 2px 0 var(--secondary-color);
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: var(--text-color);
}

.cta-button {
    display: inline-block;
    padding: 15px 30px;
    background-color: var(--accent-color);
    color: var(--white) !important;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 50px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.2);
}

.cta-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 9px 0 rgba(0, 0, 0, 0.2);
}

/* 产品区域样式 */
.products {
    padding: 80px 5%;
    background-color: var(--white);
}

.product-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.product-card {
    background-color: var(--light-bg);
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    border: 5px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 80px;
    height: 80px;
    background-color: var(--secondary-color);
    transform: rotate(45deg);
    z-index: 0;
}

.product-card:hover {
    transform: translateY(-10px);
}

.product-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    background-color: var(--white);
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: 50%;
    margin: 0 auto 20px;
    position: relative;
    z-index: 1;
    box-shadow: var(--shadow);
}

.product-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--dark-bg);
    position: relative;
    z-index: 1;
}

.product-card p {
    color: var(--text-color);
    position: relative;
    z-index: 1;
}

/* 关于我们样式 */
.about {
    padding: 80px 5%;
    background-color: var(--light-bg);
}

.about-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.about-image {
    flex: 1;
    min-width: 300px;
    text-align: center;
}

.about-image img {
    max-width: 100%;
    border-radius: var(--border-radius);
    border: 5px solid var(--primary-color);
    box-shadow: var(--shadow);
}

.about-text {
    flex: 2;
    min-width: 300px;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* 服务项目样式 */
.services {
    padding: 80px 5%;
    background-color: var(--white);
    position: relative;
    overflow: hidden;
}

.services::before,
.services::after {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    background-color: var(--secondary-color);
    opacity: 0.2;
    border-radius: 50%;
    z-index: 0;
}

.services::before {
    top: 20%;
    left: -50px;
}

.services::after {
    bottom: 20%;
    right: -50px;
}

.service-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.service-card {
    background-color: var(--light-bg);
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    border: 5px solid var(--primary-color);
}

.service-card:hover {
    transform: scale(1.05);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    background-color: var(--white);
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: 50%;
    margin: 0 auto 20px;
    box-shadow: var(--shadow);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--dark-bg);
}

/* 联系我们样式 */
.contact {
    padding: 80px 5%;
    background-color: var(--light-bg);
}

.contact-container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-info,
.contact-form {
    flex: 1;
    min-width: 300px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.contact-icon {
    font-size: 1.5rem;
    margin-right: 15px;
    background-color: var(--primary-color);
    color: var(--white);
    width: 50px;
    height: 50px;
    line-height: 50px;
    text-align: center;
    border-radius: 50%;
    box-shadow: var(--shadow);
}

.contact-form {
    background-color: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 5px solid var(--primary-color);
}

.contact-form h3 {
    margin-bottom: 20px;
    color: var(--dark-bg);
    text-align: center;
    font-size: 1.8rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.submit-button {
    display: inline-block;
    padding: 12px 25px;
    background-color: var(--primary-color);
    color: var(--white);
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.1);
}

.submit-button:hover {
    background-color: var(--dark-bg);
    transform: translateY(-3px);
    box-shadow: 0 7px 0 rgba(0, 0, 0, 0.1);
}

/* 页脚样式 */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding-top: 60px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5% 40px;
}

.footer-logo {
    flex: 1;
    min-width: 250px;
}

.footer-logo img {
    width: 60px; /* 增大一点logo尺寸 */
    margin-bottom: 15px;
}

.footer-logo p {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.footer-links,
.footer-contact {
    flex: 1;
    min-width: 250px;
}

.footer-links h3,
.footer-contact h3 {
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: var(--white);
    transition: color 0.3s ease;
}

.footer-links ul li a:hover {
    color: var(--secondary-color);
}

.footer-contact p {
    margin-bottom: 10px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icon {
    display: inline-block;
    padding: 8px 15px;
    background-color: var(--dark-bg);
    color: var(--white);
    border-radius: 5px;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-3px);
    background-color: var(--secondary-color);
    color: var(--text-color);
}

.copyright {
    text-align: center;
    padding: 20px 5%;
    background-color: var(--dark-bg);
    font-size: 0.9rem;
}

.copyright p {
    margin-bottom: 5px;
}

.copyright a {
    color: var(--white);
    text-decoration: underline;
}

.copyright a:hover {
    color: var(--secondary-color);
}

/* 响应式设计 */
@media (max-width: 992px) {
    header {
        flex-direction: column;
        text-align: center;
    }
    
    .logo-container {
        align-items: center;
        margin-bottom: 20px;
    }
    
    .hero-content h2 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .hero {
        height: auto;
        padding: 80px 20px;
    }
    
    .hero-content {
        padding: 30px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .about-content {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .cta-button {
        padding: 12px 25px;
        font-size: 1rem;
    }
    
    .product-container,
    .service-container {
        grid-template-columns: 1fr;
    }
}

/* 添加云朵动画效果 */
.cloud {
    position: absolute;
    width: 200px;
    height: 100px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50px;
    z-index: 1;
    animation: moveCloud linear infinite;
}

.cloud::before,
.cloud::after {
    content: '';
    position: absolute;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
}

.cloud::before {
    width: 120px;
    height: 120px;
    top: -55px;
    left: 25px;
}

.cloud::after {
    width: 100px;
    height: 100px;
    top: -40px;
    right: 25px;
}

@keyframes moveCloud {
    0% {
        transform: translateX(-250px);
    }
    100% {
        transform: translateX(calc(100vw + 250px));
    }
}

/* 滚动动画元素 */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.active {
    opacity: 1;
    transform: translateY(0);
}

/* Logo弹跳动画 */
.logo-bounce {
    animation: logoBounce 1s ease;
}

@keyframes logoBounce {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.app-download-button {
    display: inline-flex;
    align-items: center;
    background-color: var(--accent-color);
    color: var(--white) !important;
    padding: 12px 24px;
    border-radius: 50px;
    margin-top: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.app-download-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.android-icon {
    width: 24px;
    height: 24px;
    margin-right: 8px;
}

/* 隐私协议页面样式 */
.privacy-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.privacy-container h1 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
    text-shadow: 1px 1px 0 var(--secondary-color);
}

.privacy-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.privacy-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}