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

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #8e9eab, #eef2f3);
    color: #333;
    line-height: 1.6;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* 头部样式 */
header {
    text-align: center;
    padding: 50px 20px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 2.5rem;
    font-weight: bold;
    color: #4a4a4a;
    margin-bottom: 10px;
}

header p {
    font-size: 1.2rem;
    color: #6a6a6a;
}

/* 主内容区域 */
.main-content {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 20px;
}

/* 侧边栏样式 */
.sidebar {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.sidebar h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #555;
}

.sidebar ul {
    list-style: none;
}

.sidebar ul li {
    margin-bottom: 10px;
}

.sidebar ul li a {
    text-decoration: none;
    color: #007BFF;
    transition: color 0.3s ease;
}

.sidebar ul li a:hover {
    color: #0056b3;
}

/* 文章内容样式 */
.article-content {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.article-content h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 20px;
}

.article-content h3 {
    font-size: 1.5rem;
    color: #444;
    margin-top: 20px;
    margin-bottom: 10px;
}

.article-content p {
    font-size: 1rem;
    color: #555;
    margin-bottom: 15px;
}

.article-content pre {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 15px;
}

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

.article-content img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 20px 0;
}

/* 示例展示样式 */
.example-display {
    background: rgba(240, 248, 255, 0.7);
    backdrop-filter: blur(8px);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.example-display h2 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 15px;
}

.example-display p {
    font-size: 1rem;
    color: #555;
    margin-bottom: 10px;
}

.example-display ul {
    list-style: none;
    padding-left: 0;
}

.example-display ul li {
    background: #ffffff;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.example-display ul li strong {
    color: #333;
}

.example-display ul li span {
    display: block;
    color: #666;
    margin-top: 5px;
}

/* 图片样式 */
.image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.image-gallery img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
}

/* 响应式设计 */
@media (max-width: 1440px) {
    .main-content {
        grid-template-columns: 1fr 3fr;
    }
}

@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .sidebar {
        order: 2;
    }
}

@media (max-width: 1024px) {
    .header h1 {
        font-size: 2.2rem;
    }

    .article-content h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .header {
        padding: 30px 10px;
    }

    .article-content {
        padding: 20px;
    }

    .sidebar {
        padding: 15px;
    }

    .example-display {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }

    .article-content h3 {
        font-size: 1.3rem;
    }

    .sidebar h2 {
        font-size: 1.5rem;
    }

    .example-display h2 {
        font-size: 1.5rem;
    }

    .image-gallery img {
        width: 80px;
        height: 80px;
    }
}

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

    .article-content {
        padding: 15px;
    }

    .sidebar {
        padding: 10px;
    }

    .image-gallery img {
        width: 70px;
        height: 70px;
    }
}

/* 按钮样式 */
button, .button {
    background: linear-gradient(45deg, #ff9a9e, #fad0c4);
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease;
    position: relative;
    overflow: hidden;
}

button:hover, .button:hover {
    transform: scale(1.05);
    background: linear-gradient(45deg, #fad0c4, #ff9a9e);
}

button::before, .button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        width: 200px;
        height: 200px;
        opacity: 0;
    }
}

/* 链接样式 */
a {
    color: #007BFF;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* 提示样式 */
.notice {
    text-align: center;
    font-size: 1rem;
    color: #ff4d4d;
    margin-top: 20px;
}

