
/* 样式设计 */
body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #0a0a0a, #222233);
    color: #ffffff;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

header {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px 0;
    text-align: center;
    width: 100%;
    margin-bottom: 20px;
}

header h1 {
    font-size: 2.5em;
    color: #f0f0f0;
    margin: 0;
    letter-spacing: 1.2px;
    text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.3);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.section-title {
    color: #bb86fc;
    font-size: 2em;
    border-bottom: 2px solid #bb86fc;
    padding-bottom: 10px;
    margin-bottom: 25px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.12);
}

.card img {
    width: 100%;
    border-radius: 4px;
    margin-bottom: 15px;
    display: block;
    object-fit: cover;
    aspect-ratio: 3/2;
}

.card-title {
    font-size: 1.4em;
    color: #e0e0e0;
    margin-bottom: 10px;
}

.card-type {
    font-size: 0.9em;
    color: #999;
    margin-bottom: 8px;
}

.card-function {
    font-size: 0.95em;
    color: #ccc;
    margin-bottom: 12px;
}

.card-description {
    font-size: 1em;
    line-height: 1.4;
    color: #ddd;
}

article {
    padding: 25px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

article h2 {
    color: #00bcd4;
    font-size: 2.2em;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #00bcd4;
    padding-bottom: 8px;
}

article h3 {
    color: #80deea;
    font-size: 1.6em;
    margin-top: 25px;
    margin-bottom: 15px;
}

article p, article ul, article ol, article table {
    color: #eee;
    font-size: 1.1em;
    line-height: 1.7;
    margin-bottom: 20px;
}

article ul, article ol {
    padding-left: 30px;
}

article li {
    margin-bottom: 8px;
}

article b, article strong {
    color: #b2ebf2;
    font-weight: bolder;
}

article i, article em {
    font-style: italic;
    color: #cddc39;
}

article pre {
    background-color: #2d2d2d;
    color: #f8f8f2;
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 0.9em;
    line-height: 1.5;
    tab-size: 4;
    white-space: pre-wrap;
    word-wrap: break-word;
}

article code {
    font-family: monospace, monospace;
    font-size: 0.9em;
    color: #ffeb3b;
    background-color: #333;
    padding: 3px 5px;
    border-radius: 3px;
}

article pre code {
    background-color: transparent;
    padding: 0;
}

article table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

article th, article td {
    border: 1px solid #555;
    padding: 10px;
    text-align: left;
}

article th {
    background-color: #333;
    color: #eee;
    font-weight: bold;
}

footer {
    text-align: center;
    padding: 20px 0;
    color: #888;
    font-size: 0.9em;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .container {
        width: 95%;
        padding: 15px;
    }

    header h1 {
        font-size: 2em;
    }

    .section-title {
        font-size: 1.8em;
        margin-bottom: 20px;
    }

    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }

    .card {
        padding: 15px;
    }

    .card-title {
        font-size: 1.2em;
    }

    .card-description {
        font-size: 0.95em;
    }

    article {
        padding: 20px;
    }

    article h2 {
        font-size: 1.8em;
        margin-bottom: 15px;
    }

    article h3 {
        font-size: 1.4em;
        margin-top: 20px;
        margin-bottom: 12px;
    }

    article p, article ul, article ol, article table {
        font-size: 1em;
        line-height: 1.6;
        margin-bottom: 15px;
    }

    article ul, article ol {
        padding-left: 25px;
    }
}

@media screen and (max-width: 480px) {
    header h1 {
        font-size: 1.7em;
    }

    .section-title {
        font-size: 1.6em;
    }

    .card-grid {
        grid-template-columns: 1fr; /* Stack cards on smaller screens */
    }

    .card-title {
        font-size: 1.1em;
    }

    article h2 {
        font-size: 1.6em;
    }

    article h3 {
        font-size: 1.3em;
    }
}

@media screen and (max-width: 320px) {
    header h1 {
        font-size: 1.5em;
    }

    .section-title {
        font-size: 1.4em;
    }

    article h2 {
        font-size: 1.4em;
    }

    article h3 {
        font-size: 1.2em;
    }

    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
}
/* 补充样式，增加视觉层次和美感 */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://images.gptkong.com/demo/sample12.png'), url('https://images.gptkong.com/demo/sample11.png');
    background-size: 200px, 150px;
    background-position: 0 0, 100% 100%;
    background-repeat: no-repeat, no-repeat;
    opacity: 0.08;
    pointer-events: none;
    z-index: -1;
}

.container::before {
    content: "";
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(45deg, rgba(171, 71, 255, 0.1), transparent);
    border-radius: 10px;
    z-index: -1;
}

.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 6px;
    background: linear-gradient(120deg, rgba(171, 71, 255, 0.05), transparent);
    z-index: -1;
}

.card-grid {
    padding: 0 10px; /* 左右内边距，防止卡片紧贴容器边缘 */
}

article pre {
    border: 1px solid rgba(255,255,255,0.1); /* 代码块边框 */
}

article table {
    border: 1px solid rgba(255,255,255,0.1); /* 表格边框 */
}

article th, article td {
    border-color: rgba(255,255,255,0.1); /* 表格单元格边框颜色 */
}

.card-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}

.card-image-container img {
    transition: transform 0.5s ease;
}

.card:hover .card-image-container img {
    transform: scale(1.1);
}

.card-content {
    padding-top: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: calc(100% - (3/2 * 100%)); /* 保持内容区域高度 */
}
/* 增加文字阴影效果 */
header h1, .section-title, .card-title, article h2, article h3, article p, article ul, article ol, article table, article pre, article code, article th, article td, .card-type, .card-function, .card-description, footer {
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2);
}

/* 深色背景下，调整部分文字颜色，增强对比度 */
.card-type, .card-function, .card-description, footer, article p, article ul, article ol, article table, article td {
    color: #d4d4d4; /* 调整为更柔和的灰色 */
}

article code {
    color: #ffdd57; /* 代码颜色调整为更亮的黄色 */
    background-color: #2e2e2e; /* 代码背景颜色微调深色 */
}

article pre {
    background-color: #252525; /* 预格式文本背景颜色微调深色 */
}

