
/* 基础重置与全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #1e1e1e, #121212);
    color: #ffffff;
    line-height: 1.6;
    padding: 20px;
    animation: backgroundAnimation 15s linear infinite;
}
@keyframes backgroundAnimation {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}
header {
    text-align: center;
    padding: 50px 0;
    background: radial-gradient(circle, rgba(255,87,34,1) 0%, rgba(74,144,226,1) 100%);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}
header h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 20px;
}
header p {
    font-size: 1.2rem;
    color: #f0f0f0;
}
.navigation {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 30px 0;
}
.navigation a {
    text-decoration: none;
    color: #4A90E2;
    font-size: 1.1rem;
    transition: color 0.3s ease, transform 0.3s ease;
    position: relative;
}
.navigation a:hover {
    color: #FFC107;
    transform: scale(1.1);
}
.navigation a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: #FFC107;
    transition: width 0.3s;
    position: absolute;
    bottom: -5px;
    left: 0;
}
.navigation a:hover::after {
    width: 100%;
}
main {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
article {
    flex: 2 1 60%;
    background: #2B2B2B;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
article h2, article h3 {
    font-family: 'Orbitron', sans-serif;
    color: #6F33FF;
    margin-bottom: 15px;
}
article h2 {
    font-size: 2rem;
    border-bottom: 2px solid #4A90E2;
    padding-bottom: 10px;
}
article h3 {
    font-size: 1.5rem;
    margin-top: 20px;
}
article p {
    margin-bottom: 15px;
    color: #ffffff;
}
article pre {
    background: #1e1e1e;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 15px;
}
article code {
    font-family: 'Courier New', Courier, monospace;
    color: #4A90E2;
}
article table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}
article table, article th, article td {
    border: 1px solid #4A90E2;
}
article th, article td {
    padding: 10px;
    text-align: left;
}
article th {
    background: #4A90E2;
    color: #ffffff;
}
.sidebar {
    flex: 1 1 35%;
    background: #2B2B2B;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.sidebar img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 15px;
}
.sidebar img:nth-child(odd) {
    animation: float 6s ease-in-out infinite;
}
.sidebar img:nth-child(even) {
    animation: float 8s ease-in-out infinite;
}
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}
footer {
    text-align: center;
    padding: 30px 0;
    margin-top: 40px;
    background: #1e1e1e;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}
footer p {
    font-size: 1rem;
    color: #f0f0f0;
}
@media (max-width: 1440px) {
    header h1 {
        font-size: 2.5rem;
    }
    article, .sidebar {
        flex: 1 1 100%;
    }
}
@media (max-width: 1200px) {
    .container {
        padding: 15px;
    }
    header {
        padding: 40px 0;
    }
}
@media (max-width: 1024px) {
    article h2 {
        font-size: 1.8rem;
    }
    .navigation a {
        font-size: 1rem;
    }
}
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    main {
        flex-direction: column;
    }
    .navigation {
        flex-direction: column;
        gap: 15px;
    }
}
@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }
    article h2 {
        font-size: 1.5rem;
    }
    article h3 {
        font-size: 1.2rem;
    }
}
@media (max-width: 320px) {
    body {
        padding: 10px;
    }
    .navigation a {
        font-size: 0.9rem;
    }
}
.button {
    background-color: #4A90E2;
    color: #FFFFFF;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    font-size: 1rem;
}
.button:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 16px rgba(74, 144, 226, 0.5);
}
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #6F33FF;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.code-preview {
    background: #2B2B2B;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 15px;
    color: #4A90E2;
}
.code-preview pre {
    margin: 0;
    font-family: 'Courier New', Courier, monospace;
}
button, .button {
    font-family: 'Roboto', sans-serif;
}

