
/* 全局样式 */
body {
    margin: 0;
    font-family: 'Open Sans', sans-serif;
    background: linear-gradient(135deg, #2C3E50, #34495E);
    color: #FFFFFF;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: bold;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1.5rem;
}

a {
    color: #1ABC9C;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #E74C3C;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(90deg, #2C3E50, #34495E);
    padding: 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #E74C3C;
}

.header .menu {
    display: flex;
    gap: 20px;
}

.header .menu a {
    color: #FFFFFF;
    font-size: 1rem;
    padding: 8px 12px;
    border-radius: 4px;
}

.header .menu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* 主体布局 */
.main {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.sidebar {
    grid-column: span 3;
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 8px;
}

.sidebar h3 {
    color: #1ABC9C;
    margin-bottom: 1rem;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar ul li {
    margin-bottom: 0.8rem;
}

.sidebar ul li a {
    color: #FFFFFF;
    font-size: 0.9rem;
}

.sidebar ul li a:hover {
    text-decoration: underline;
}

.main-content {
    grid-column: span 9;
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 8px;
}

/* 文章样式 */
.article {
    max-width: 100%;
    margin-bottom: 2rem;
}

.article h2 {
    color: #E74C3C;
    margin-bottom: 1rem;
}

.article p {
    color: #ECF0F1;
    font-size: 1rem;
}

.article pre {
    background: #1E272E;
    color: #ECF0F1;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

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

.article table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.article table th, .article table td {
    border: 1px solid #34495E;
    padding: 10px;
    text-align: left;
}

.article table th {
    background: #2C3E50;
    color: #ECF0F1;
}

.article table td {
    background: #34495E;
}

/* 卡片样式 */
.card {
    background-color: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
    color: #2C3E50;
}

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

.card h3 {
    margin-top: 0;
    color: #E74C3C;
}

.card p {
    color: #34495E;
}

/* 图片样式 */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 20px;
}

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

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

    .sidebar {
        grid-column: span 12;
    }

    .main-content {
        grid-column: span 12;
    }
}

@media (max-width: 768px) {
    .header .menu {
        flex-direction: column;
        gap: 10px;
    }

    .gallery {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
}

@media (max-width: 480px) {
    .header .logo {
        font-size: 1.5rem;
    }

    .header .menu a {
        font-size: 0.9rem;
    }

    .article pre {
        font-size: 0.8rem;
    }
}

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

.fade-in {
    animation: fadeIn 1s ease-in-out;
}

