
/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 全局字体与背景 */
body {
    font-family: 'Helvetica', sans-serif;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    background-size: 300% 300%;
    animation: gradient-animation 10s ease infinite;
    color: #ffffff;
    line-height: 1.6;
    padding: 20px;
}

/* 渐变动画关键帧 */
@keyframes gradient-animation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 主容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

/* 标题样式 */
h1, h2, h3, h4 {
    font-family: 'Helvetica', sans-serif;
    color: #00ffff;
    text-shadow: 2px 2px 5px rgba(0, 255, 255, 0.8);
    margin-bottom: 20px;
}

h1 {
    font-size: 48px;
    text-align: center;
    letter-spacing: 2px;
    animation: fadeInDown 1s ease forwards;
}

h2 {
    font-size: 36px;
    margin-top: 40px;
}

h3 {
    font-size: 28px;
    margin-top: 30px;
}

h4 {
    font-size: 24px;
    margin-top: 25px;
}

/* 动画关键帧 - 标题 */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 段落样式 */
p {
    margin-bottom: 20px;
    font-size: 16px;
    color: #dddddd;
}

/* 列表样式 */
ul, ol {
    margin-bottom: 20px;
    padding-left: 20px;
}

li {
    margin-bottom: 10px;
    font-size: 16px;
    color: #cccccc;
}

/* 代码块样式 */
pre {
    background: #1e1e1e;
    padding: 15px;
    border-radius: 10px;
    overflow-x: auto;
    margin-bottom: 20px;
}

code {
    font-family: 'Courier New', Courier, monospace;
    color: #00ffcc;
    font-size: 14px;
}

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

th, td {
    border: 1px solid #555555;
    padding: 10px;
    text-align: left;
    color: #ffffff;
}

th {
    background: #333333;
    font-weight: bold;
}

td {
    background: #2a2a2a;
}

/* 图片样式 */
img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 20px;
}

/* 链接样式 */
a {
    color: #00ffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #ff00ff;
}

/* 按钮样式 */
button {
    background: #ff00ff;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

button:hover {
    transform: scale(1.1);
    box-shadow: 0px 5px 15px rgba(255, 0, 255, 0.5);
}

/* 网格布局 */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* 卡片样式 */
.card {
    background: rgba(50, 50, 50, 0.8);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.6);
}

/* 代码示例预览样式 */
.code-preview {
    background: #1e1e1e;
    padding: 15px;
    border-radius: 10px;
    font-family: 'Courier New', Courier, monospace;
    color: #00ffcc;
    overflow-x: auto;
    margin-bottom: 20px;
}

/* 响应式设计 */
@media (max-width: 1440px) {
    h1 {
        font-size: 42px;
    }
    h2 {
        font-size: 32px;
    }
    h3 {
        font-size: 24px;
    }
}

@media (max-width: 1200px) {
    .container {
        padding: 30px 15px;
    }
}

@media (max-width: 1024px) {
    h1 {
        font-size: 36px;
    }
    h2 {
        font-size: 28px;
    }
    h3 {
        font-size: 22px;
    }
}

@media (max-width: 768px) {
    .grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    h1 {
        font-size: 32px;
    }
    h2 {
        font-size: 24px;
    }
    h3 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px 10px;
    }
    h1 {
        font-size: 28px;
    }
    h2 {
        font-size: 22px;
    }
    h3 {
        font-size: 18px;
    }
}

@media (max-width: 320px) {
    h1 {
        font-size: 24px;
    }
    h2 {
        font-size: 20px;
    }
    h3 {
        font-size: 16px;
    }
}

/* 提示信息样式 */
.notice {
    text-align: center;
    font-size: 18px;
    color: #ff00ff;
    margin-bottom: 30px;
}

/* 示例展示样式 */
.example-display {
    background: rgba(30, 30, 30, 0.9);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 40px;
}

.example-display h2 {
    color: #ffcc00;
}

.example-display pre {
    background: #2a2a2a;
    padding: 10px;
    border-radius: 5px;
}


