
/* 全局样式 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: radial-gradient(circle, rgba(0, 8, 43, 1) 0%, rgba(10, 10, 20, 1) 70%);
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
}
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
}
header {
    grid-column: span 12;
    text-align: center;
    padding: 40px 0;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}
header h1 {
    font-size: 2.5em;
    margin: 0;
    color: #ffffff;
    animation: fadeIn 2s ease-in-out;
}
nav {
    grid-column: span 12;
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}
nav a {
    color: #ffffff;
    text-decoration: none;
    margin: 0 15px;
    font-size: 1.1em;
    position: relative;
    transition: color 0.3s ease;
}
nav a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: #ff4081;
    transition: width 0.3s;
    position: absolute;
    bottom: -5px;
    left: 0;
}
nav a:hover {
    color: #ff4081;
}
nav a:hover::after {
    width: 100%;
}
.main-content {
    grid-column: span 8;
}
.sidebar {
    grid-column: span 4;
}
.article {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
}
.article h2 {
    font-size: 1.8em;
    margin-bottom: 15px;
    color: #ffeb3b;
}
.article p {
    margin-bottom: 15px;
    font-size: 1em;
}
.article ul {
    list-style: inside disc;
    margin-bottom: 15px;
}
.article pre {
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
}
.article code {
    color: #4caf50;
    font-family: 'Courier New', Courier, monospace;
}
.sidebar .widget {
    background: rgba(255, 255, 255, 0.15);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.sidebar .widget h3 {
    margin-top: 0;
    color: #ff4081;
    font-size: 1.3em;
}
.sidebar .widget ul {
    list-style: none;
    padding: 0;
}
.sidebar .widget li {
    margin-bottom: 10px;
}
.sidebar .widget a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}
.sidebar .widget a:hover {
    color: #ffeb3b;
}
.footer {
    grid-column: span 12;
    text-align: center;
    padding: 20px 0;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.footer p {
    margin: 0;
    font-size: 0.9em;
    color: #ffffff;
}
img.decorative {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}
img.decorative:hover {
    transform: scale(1.05);
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 1440px) {
    .container {
        width: 95%;
    }
}
@media (max-width: 1200px) {
    header h1 {
        font-size: 2.2em;
    }
}
@media (max-width: 1024px) {
    .container {
        grid-template-columns: repeat(8, 1fr);
    }
    .main-content {
        grid-column: span 8;
    }
    .sidebar {
        grid-column: span 8;
    }
}
@media (max-width: 768px) {
    .container {
        grid-template-columns: repeat(4, 1fr);
    }
    nav {
        flex-direction: column;
    }
    nav a {
        margin: 10px 0;
    }
}
@media (max-width: 480px) {
    header h1 {
        font-size: 1.8em;
    }
    nav a {
        font-size: 1em;
    }
}
@media (max-width: 320px) {
    .container {
        padding: 10px;
    }
    header h1 {
        font-size: 1.5em;
    }
    .article h2 {
        font-size: 1.5em;
    }
}
button, .button {
    background: #ff4081;
    border: none;
    padding: 10px 20px;
    color: #ffffff;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease;
}
button:hover, .button:hover {
    transform: scale(1.05);
    background: #e040fb;
}
a.button-link {
    text-decoration: none;
    display: inline-block;
    margin-top: 10px;
}
a.button-link:hover {
    text-decoration: none;
}
.code-preview {
    background: rgba(0, 0, 0, 0.8);
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 20px;
}
.code-preview code {
    color: #00e676;
    font-family: 'Courier New', Courier, monospace;
}
.dynamic-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,87,34,0.3) 0%, transparent 70%);
    animation: aurora-move 15s linear infinite;
    z-index: -1;
}
@keyframes aurora-move {
    0% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-50px) rotate(180deg); }
    100% { transform: translateY(0) rotate(360deg); }
}
a.internal-link {
    color: #4fc3f7;
    text-decoration: none;
    transition: color 0.3s ease;
}
a.internal-link:hover {
    color: #81d4fa;
}
pre {
    white-space: pre-wrap; 
    word-wrap: break-word;
}
@media (prefers-color-scheme: dark) {
    body {
        background: radial-gradient(circle, rgba(10, 10, 20, 1) 0%, rgba(0, 0, 43, 1) 70%);
    }
}

