/* 全局样式 */
:root {
    --primary-color: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --secondary-color: #10b981;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --gray-color: #94a3b8;
    --card-bg: #ffffff;
    --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --gradient-bg: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

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

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f5f7fa;
    overflow-x: hidden;
}

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

/* 头部样式 */
header {
    background: var(--gradient-bg);
    color: white;
    padding: 80px 0;
    text-align: center;
    border-radius: 0 0 20px 20px;
    margin-bottom: 40px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    animation: pulse 15s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.5;
    }
    100% {
        transform: scale(1);
        opacity: 0.3;
    }
}

.header-content {
    position: relative;
    z-index: 1;
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

header h1 span {
    font-weight: 300;
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* 主要内容区域 */
main {
    padding: 20px 0 60px;
}

section {
    margin-bottom: 60px;
}

.intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px;
    padding: 0 20px;
}

.intro h2 {
    font-size: 2.2rem;
    color: var(--dark-color);
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.intro h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.intro p {
    font-size: 1.1rem;
    color: #64748b;
    line-height: 1.8;
}

/* 项目卡片样式 */
.projects {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.project-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.project-icon {
    background: var(--gradient-bg);
    color: white;
    font-size: 2rem;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-content h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.project-content p {
    color: #64748b;
    margin-bottom: 20px;
    flex-grow: 1;
}

.project-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.project-features span {
    background: #f1f5f9;
    color: var(--primary-dark);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s ease;
    margin-top: auto;
}

.btn i {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.btn:hover {
    background: var(--primary-dark);
}

.btn:hover i {
    transform: translateX(3px);
}

.access-info {
    margin-top: 12px;
    font-size: 0.9rem;
    color: var(--gray-color);
    font-style: italic;
}

/* API 信息区域 */
.api-info {
    margin-top: 40px;
}

.api-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--card-shadow);
    max-width: 800px;
    margin: 0 auto;
}

.api-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--dark-color);
    display: flex;
    align-items: center;
}

.api-card h3 i {
    color: var(--primary-color);
    margin-right: 10px;
}

.api-card p {
    color: #64748b;
    margin-bottom: 20px;
}

.api-details {
    background: #f8fafc;
    border-radius: 8px;
    padding: 20px;
}

.api-url {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.api-url span {
    font-weight: 500;
    color: var(--dark-color);
}

.api-url code {
    background: #e2e8f0;
    padding: 6px 12px;
    border-radius: 6px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    color: var(--primary-dark);
    flex-grow: 1;
}

.copy-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.copy-btn:hover {
    background: var(--primary-dark);
}

/* 页脚样式 */
footer {
    background: var(--dark-color);
    color: white;
    padding: 60px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.footer-logo p {
    opacity: 0.7;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-link {
    color: white;
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.footer-link:hover {
    opacity: 1;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: background 0.3s ease;
}

.social-icon:hover {
    background: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    opacity: 0.7;
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    header {
        padding: 60px 0;
    }
    
    header h1 {
        font-size: 2.2rem;
    }
    
    .intro h2 {
        font-size: 1.8rem;
    }
    
    .projects {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 30px;
    }
    
    .api-url {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .api-url code {
        width: 100%;
        overflow-x: auto;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    header p {
        font-size: 1rem;
    }
    
    .intro h2 {
        font-size: 1.5rem;
    }
    
    .project-content {
        padding: 20px;
    }
    
    .project-content h3 {
        font-size: 1.3rem;
    }
}
