/* 基础样式重置 */
:root {
    --primary-color: #3b82f6; /* 蓝色 - 主色调 */
    --secondary-color: #10b981; /* 绿色 - 次要色调 */
    --accent-color: #06d6a0; /* 浅绿色 - 强调色调 */
    --background-light: #f8fafc;
    --background-dark: #e2e8f0;
    --text-color: #1a202c;
    --text-light: #4a5568;
    --card-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    --hover-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #3b82f6 0%, #10b981 100%);
    background-attachment: fixed;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.05"><path d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/></g></g></svg>');
    z-index: -1;
}

/* 容器样式 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部样式 */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 2rem 0;
    text-align: center;
    width: 100%;
    color: var(--text-color);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header p {
    margin-top: 0.5rem;
    font-size: 1.2rem;
    opacity: 0.8;
    font-weight: 300;
}

/* 主要内容区域 */
main {
    flex: 1;
    width: 100%;
    padding: 3rem 0;
}

section {
    margin-bottom: 3rem;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.2rem;
    color: white;
    position: relative;
    padding-bottom: 1rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

/* 服务卡片样式 */
.service-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    margin: 0 auto;
}

.service-card {
    width: 320px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 20px 20px 0 0;
}

.service-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--hover-shadow);
}

.service-card img {
    width: 100%;
    height: 200px;
    display: block;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.service-card:hover img {
    transform: scale(1.05);
}

.service-card h3 {
    padding: 20px 15px;
    margin: 0;
    text-align: center;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(16, 185, 129, 0.1));
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-color);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* App introduction styles */
.app-intro {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 40px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.app-content {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    text-align: left;
}

.app-logo {
    flex-shrink: 0;
    margin: 0;
    background: transparent;
}

.app-logo img {
    width: 217px;
    height: 217px;
    border-radius: 16px;
    background-color: transparent !important;
    mix-blend-mode: normal;
    border: none;
    outline: none;
    image-rendering: auto;
    -webkit-mask-image: none;
    mask-image: none;
}

.app-info {
    flex: 1;
}

.app-info p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: var(--text-color);
    font-size: 1rem;
}

.app-info p:first-of-type {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.app-download {
    margin-top: 20px;
}

.app-intro ul {
    list-style: none;
    padding: 0;
    margin: 30px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    text-align: center;
}

.app-intro li {
    padding: 15px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(16, 185, 129, 0.1));
    border-radius: 12px;
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.app-intro li:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.app-intro li:last-child {
    border-bottom: none;
}

.app-download {
    margin-top: 30px;
}

.app-store-link {
    display: inline-block;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.app-store-link:hover {
    transform: scale(1.05);
}

.app-store-link img {
    height: 60px;
    border-radius: 8px;
}

/* MakerWorld introduction styles */
.makerworld-intro {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: 30px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.makerworld-intro p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: var(--text-color);
    font-size: 1rem;
}

.makerworld-link {
    margin-top: 25px;
}

.makerworld-button {
    display: inline-block;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.makerworld-button:hover {
    transform: scale(1.05);
}

.makerworld-button:hover {
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.makerworld-button {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
}

/* 页脚样式 */
footer {
    background: rgba(44, 62, 80, 0.95);
    backdrop-filter: blur(10px);
    text-align: center;
    padding: 2.5rem 0;
    width: 100%;
    margin-top: auto;
    color: white;
    position: relative;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--secondary-color));
}

footer p {
    margin: 0.8rem 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    font-weight: 300;
}

footer a {
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.4);
    padding-bottom: 2px;
}

footer a:hover {
    color: var(--accent-color);
    border-bottom: 1px solid var(--accent-color);
    text-decoration: none;
}

/* 响应式布局 */
@media (max-width: 992px) {
    .service-cards {
        gap: 20px;
    }
    
    .service-card {
        width: 280px;
    }
}

@media (max-width: 768px) {
    .service-cards {
        flex-direction: column;
        align-items: center;
    }
    
    .service-card {
        width: 100%;
        max-width: 350px;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.6rem;
    }
    
    header p {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.4rem;
    }
    
    .service-card {
        max-width: 300px;
    }
    
    .app-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .app-logo {
        margin-bottom: 20px;
    }
}

/* 缩放适配样式 */
@media screen and (max-width: 100%) {
    body {
        min-width: 320px;
    }
}

/* 处理特定缩放比例下的布局问题 */
@media screen and (min-width: 320px) and (max-width: 767px) and (min-resolution: 1.5dppx) {
    .service-card {
        transform: none !important;
    }
    
    .service-cards {
        gap: 25px;
    }
}

/* 修复iOS设备上的缩放问题 */
.mobile-device .service-card {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* 小屏幕设备特殊处理 */
.small-screen .service-cards {
    padding: 0 10px;
}

/* 确保图片在缩放时不会变形 */
img {
    max-width: 100%;
    height: auto;
}