
/* 全局样式 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: radial-gradient(circle, #000046, #1CB5E0);
    color: #ffffff;
    overflow-x: hidden;
    transition: background 0.5s ease;
}

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

a:hover {
    color: #FF5722;
}

header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 60px;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1000;
}

header .logo {
    font-size: 1.5em;
    font-weight: bold;
    color: #1CB5E0;
}

nav {
    display: flex;
    gap: 15px;
}

nav a {
    font-size: 1em;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background 0.3s ease, color 0.3s ease;
}

nav a:hover {
    background: #1CB5E0;
    color: #000;
}

.sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    width: 200px;
    height: calc(100% - 60px);
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

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

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

.sidebar ul li a {
    color: #ffffff;
    font-size: 1.1em;
    padding: 10px;
    display: block;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.sidebar ul li a:hover {
    background: #FF5722;
}

.main-content {
    margin-left: 220px;
    padding: 80px 20px 20px 20px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.card {
    background: #1E1E1E;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    padding: 20px;
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.article-section {
    background: rgba(30, 30, 30, 0.8);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.article-section h2,
.article-section h3,
.article-section h4 {
    color: #1CB5E0;
}

.article-section pre {
    background: #2E2E2E;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
}

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

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

.article-section table, 
.article-section th, 
.article-section td {
    border: 1px solid #444;
}

.article-section th, 
.article-section td {
    padding: 10px;
    text-align: left;
}

.article-section th {
    background: #1CB5E0;
    color: #000;
}

.button {
    background: #4CAF50;
    color: #fff;
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: background 0.3s ease, box-shadow 0.3s ease;
    font-size: 1em;
}

.button:hover {
    background: #45a049;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.image-gallery img {
    width: 100%;
    max-width: 320px;
    border-radius: 10px;
}

.footer {
    text-align: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.8);
    position: fixed;
    bottom: 0;
    width: 100%;
    color: #fff;
}

@media (max-width: 1440px) {
    .main-content {
        margin-left: 220px;
    }
}

@media (max-width: 1200px) {
    .sidebar {
        width: 180px;
    }
    .main-content {
        margin-left: 200px;
    }
}

@media (max-width: 1024px) {
    .sidebar {
        width: 160px;
    }
    .main-content {
        margin-left: 180px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        display: flex;
        justify-content: center;
    }
    .sidebar ul {
        display: flex;
        flex-direction: row;
        gap: 10px;
    }
    .main-content {
        margin-left: 0;
        padding: 80px 10px 10px 10px;
    }
}

@media (max-width: 480px) {
    header {
        flex-direction: column;
        height: auto;
        padding: 10px;
    }
    nav {
        flex-direction: column;
        width: 100%;
    }
    nav a {
        padding: 10px;
        text-align: center;
    }
    .sidebar ul li {
        margin-bottom: 10px;
    }
}

@media (max-width: 320px) {
    .article-section {
        padding: 15px;
    }
    .button {
        padding: 10px 20px;
        font-size: 0.9em;
    }
}

