
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    color: #333333;
    background: linear-gradient(135deg, #1E90FF, #F5F5F5);
    transition: background 0.5s ease;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #1E90FF;
    display: flex;
    justify-content: space-around;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.navbar a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    transition: background-color 0.3s ease, transform 0.3s ease;
    border-radius: 4px;
}

.navbar a:hover {
    background-color: #FF8C00;
    transform: scale(1.05);
}

.navbar a.active {
    border-bottom: 2px solid #FF8C00;
}

/* 主要内容区域 */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 6rem 2rem 2rem 2rem;
    background-color: #F5F5F5;
}

/* 卡片样式 */
.card {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    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 img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.card img:hover {
    transform: scale(1.05);
}

/* 文章内容样式 */
article {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

article h2, article h3 {
    color: #1E90FF;
    margin-bottom: 1rem;
}

article p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

article pre {
    background-color: #333333;
    color: #F5F5F5;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin-bottom: 1rem;
}

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

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s forwards;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
    }

    .container {
        grid-template-columns: 1fr;
        padding: 6rem 1rem 1rem 1rem;
    }

    article {
        padding: 1rem;
    }
}

/* 按钮样式 */
.button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #32CD32;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    text-decoration: none;
    font-size: 1rem;
}

.button:hover {
    background-color: #1E90FF;
    transform: scale(1.05);
}

/* 点缀色使用 */
.accent {
    color: #FF8C00;
}

/* 提示文字样式 */
.notice {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(30, 144, 255, 0.9);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    font-size: 1.2rem;
    z-index: 2000;
    animation: fadeInUp 1s ease forwards;
}

/* 折叠区域样式 */
.collapsible {
    background-color: #1E90FF;
    color: white;
    cursor: pointer;
    padding: 0.75rem;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 1rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.collapsible:hover {
    background-color: #FF8C00;
}

.content {
    padding: 0 1rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: #F5F5F5;
    border-radius: 4px;
}

.content p {
    color: #333333;
}

/* 代码示例样式 */
.code-example {
    background-color: #2d2d2d;
    color: #f8f8f2;
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 1rem;
    font-family: 'Courier New', Courier, monospace;
}

/* 页面底部样式 */
.footer {
    background-color: #1E90FF;
    color: white;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.footer-section {
    flex: 1 1 200px;
    margin: 1rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
}

.footer a {
    color: #FF8C00;
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: white;
}

/* 图像样式 */
.image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.image-gallery img {
    width: 100%;
    max-width: 320px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.image-gallery img:hover {
    transform: scale(1.05);
}

/* 表单样式 */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333333;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus, .form-group textarea:focus {
    border-color: #1E90FF;
    outline: none;
}

/* 按钮动画 */
@keyframes buttonBounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-10px);}
    60% {transform: translateY(-5px);}
}

.button.animate {
    animation: buttonBounce 2s infinite;
}

/* 表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.table th, .table td {
    padding: 0.75rem;
    border: 1px solid #ddd;
    text-align: left;
}

.table th {
    background-color: #1E90FF;
    color: white;
}

.table tbody tr:hover {
    background-color: #f1f1f1;
}

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

a:hover {
    color: #FF8C00;
}

/* 响应式图片 */
.responsive-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 隐藏属性说明 */
img[alt=""] {
    display: block;
}

/* 提示文字隐藏 */
.notice.hidden {
    display: none;
}

/* 侧边栏样式 */
.sidebar {
    position: fixed;
    top: 0;
    left: -250px;
    width: 250px;
    height: 100%;
    background-color: #1E90FF;
    transition: left 0.3s ease;
    padding: 2rem 1rem;
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
    z-index: 1500;
}

.sidebar.active {
    left: 0;
}

.sidebar a {
    display: block;
    color: white;
    padding: 1rem 0;
    transition: background-color 0.3s ease;
}

.sidebar a:hover {
    background-color: #FF8C00;
}

.sidebar-toggle {
    position: fixed;
    top: 1rem;
    left: 1rem;
    background-color: #1E90FF;
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    z-index: 1600;
}

.sidebar-toggle:hover {
    background-color: #FF8C00;
}

/* 隐藏水平滚动条 */
body {
    overflow-x: hidden;
}

