
/* 导入字体 */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;700&family=Open+Sans:wght@400;700&display=swap');

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

body {
    font-family: 'Open Sans', sans-serif;
    background: linear-gradient(135deg, #4a90e2, #8e44ad);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 固定导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar .logo {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5em;
    font-weight: 700;
    color: #4a90e2;
}

.navbar ul {
    list-style: none;
    display: flex;
}

.navbar ul li {
    margin-left: 20px;
}

.navbar ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    transition: color 0.3s;
}

.navbar ul li a:hover {
    color: #8e44ad;
}

/* 主内容区 */
.header {
    background: linear-gradient(135deg, #4a90e2, #8e44ad);
    color: white;
    padding: 100px 20px 60px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 2.5em;
    margin-bottom: 20px;
}

.header p {
    font-size: 1.2em;
    max-width: 800px;
    margin: 0 auto;
}

.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1), transparent);
    animation: float 15s linear infinite;
    pointer-events: none;
}

@keyframes float {
    0% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
    100% { transform: translateY(0) rotate(360deg); }
}

/* 卡片式布局 */
.main {
    flex: 1;
    padding: 60px 20px 20px 20px;
    background-color: #f4f7fa;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 15px rgba(0,0,0,0.2);
}

.card h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #4a90e2;
}

.card p {
    margin-bottom: 10px;
}

.card .progress {
    background: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
    height: 10px;
    margin-bottom: 10px;
}

.card .progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4a90e2, #8e44ad);
    width: 0;
    transition: width 1s ease;
}

.card .progress-container {
    position: relative;
}

.card .progress-container::after {
    content: attr(data-progress) '%';
    position: absolute;
    right: 10px;
    top: -25px;
    font-size: 0.9em;
    color: #333;
}

.card .action {
    background: #4a90e2;
    color: white;
    border: none;
    padding: 10px;
    width: 100%;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.card .action:hover {
    background: #8e44ad;
}

/* 动态进度条 */
.card:nth-child(1) .progress-bar { width: 35%; }
.card:nth-child(2) .progress-bar { width: 15%; }
.card:nth-child(3) .progress-bar { width: 48%; }
.card:nth-child(4) .progress-bar { width: 20%; }
.card:nth-child(5) .progress-bar { width: 75%; }
.card:nth-child(6) .progress-bar { width: 50%; }

/* 示例展示部分 */
.example {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.example h2 {
    font-family: 'Poppins', sans-serif;
    color: #8e44ad;
    margin-bottom: 20px;
}

.example article h3 {
    font-family: 'Poppins', sans-serif;
    color: #4a90e2;
    margin-top: 20px;
    margin-bottom: 10px;
}

.example pre {
    background: #f0f0f0;
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    margin-bottom: 20px;
}

.example code {
    font-family: 'Courier New', Courier, monospace;
    color: #d14;
}

/* 提示文本 */
.footer-note {
    text-align: center;
    padding: 20px;
    font-size: 1em;
    color: #555;
}

/* 响应式设计 */
@media (max-width: 1440px) {
    .header h1 {
        font-size: 2.2em;
    }
    .navbar ul li a {
        font-size: 1em;
    }
}

@media (max-width: 1200px) {
    .card-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 1024px) {
    .header {
        padding: 80px 15px 40px 15px;
    }
    .navbar ul li {
        margin-left: 15px;
    }
}

@media (max-width: 768px) {
    .navbar ul {
        display: none;
    }
    .navbar .menu-icon {
        display: block;
        cursor: pointer;
    }
    .card-grid {
        grid-template-columns: 1fr;
    }
    .header h1 {
        font-size: 2em;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8em;
    }
    .card h3 {
        font-size: 1.3em;
    }
}

@media (max-width: 320px) {
    .header h1 {
        font-size: 1.5em;
    }
    .card h3 {
        font-size: 1.1em;
    }
}

