
/* 全局样式 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #8BC34A, #3F51B5, #673AB7);
    background-size: 400% 400%;
    animation: gradient-animation 10s ease infinite;
    color: #333;
}

@keyframes gradient-animation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 容器样式 */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    grid-gap: 20px;
    padding: 20px;
}

/* 卡片样式 */
.card {
    background-color: rgba(255, 255, 255, 0.85);
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

.card img {
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: 10px;
    margin-bottom: 15px;
}

.card h3 {
    font-family: 'Orbitron', sans-serif;
    color: #3F51B5;
    margin-bottom: 10px;
    text-align: center;
}

.card p {
    text-align: center;
    line-height: 1.6;
}

/* 按钮样式 */
.button {
    position: relative;
    padding: 10px 20px;
    background-color: #8BC34A;
    color: white;
    border: none;
    cursor: pointer;
    overflow: hidden;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    margin-top: 15px;
}

.button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background-color: #3F51B5;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
    z-index: -1;
}

.button:hover::before {
    width: 200%;
    height: 200%;
}

.button:hover {
    background-color: transparent;
}

/* 标题样式 */
.header {
    text-align: center;
    padding: 60px 20px;
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    background: -webkit-linear-gradient(#3F51B5, #8BC34A);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 文章部分样式 */
.article-section {
    padding: 40px 20px;
    background-color: rgba(255, 255, 255, 0.9);
}

.article-section h2 {
    text-align: center;
    font-family: 'Orbitron', sans-serif;
    color: #3F51B5;
    margin-bottom: 30px;
}

article h2, article h3 {
    font-family: 'Orbitron', sans-serif;
    color: #3F51B5;
}

article p {
    line-height: 1.8;
    margin-bottom: 20px;
}

article pre {
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 20px;
}

article code {
    font-family: 'Courier New', Courier, monospace;
    color: #d63384;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table, th, td {
    border: 1px solid #ddd;
}

th, td {
    padding: 12px;
    text-align: left;
}

th {
    background-color: #3F51B5;
    color: white;
}

td {
    background-color: #f9f9f9;
}

/* 设计参考提示 */
.design-reference {
    text-align: center;
    font-size: 1rem;
    color: #555;
    margin: 30px 0;
}

/* 响应式设计 */
@media (max-width: 320px) {
    .header {
        font-size: 2rem;
        padding: 40px 10px;
    }
    .card h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .header {
        font-size: 2.5rem;
    }
    .card h3 {
        font-size: 1.4rem;
    }
}

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

@media (min-width: 1024px) and (max-width: 1200px) {
    .container {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (min-width: 1200px) {
    .container {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
}

/* 动画与互动 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.card, .article-section {
    animation: fadeIn 1s ease-in;
}

