
/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #000033, #1A1A47);
    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%; }
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

header .logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 24px;
    font-weight: bold;
    background: linear-gradient(45deg, #00BFFF, #FF69B4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: logoGlow 3s ease-in-out infinite;
}

@keyframes logoGlow {
    0%, 100% { text-shadow: 0 0 10px #00BFFF, 0 0 20px #FF69B4; }
    50% { text-shadow: 0 0 20px #FF69B4, 0 0 30px #00BFFF; }
}

nav ul {
    list-style: none;
    display: flex;
    gap: 15px;
}

nav ul li a {
    text-decoration: none;
    color: #FFFFFF;
    font-size: 16px;
    position: relative;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: #00BFFF;
}

nav ul li a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: #00BFFF;
    transition: width 0.3s;
    position: absolute;
    left: 0;
    bottom: -5px;
}

nav ul li a:hover::after {
    width: 100%;
}

.container {
    max-width: 1200px;
    margin: 40px auto;
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 30px;
}

.sidebar {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.sidebar img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 20px;
}

.sidebar a {
    display: block;
    text-decoration: none;
    color: #FFFFFF;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.sidebar a:hover {
    color: #00BFFF;
}

.main-content {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.main-content h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 32px;
    margin-bottom: 20px;
    background: linear-gradient(90deg, #00BFFF, #FF69B4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.main-content p {
    margin-bottom: 20px;
    font-size: 16px;
}

.main-content pre {
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 20px;
}

.main-content code {
    font-family: 'Courier New', Courier, monospace;
    color: #00FFFF;
}

.article {
    margin-top: 40px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.article h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 28px;
    margin-bottom: 15px;
    color: #FF69B4;
}

.article h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 22px;
    margin-top: 20px;
    margin-bottom: 10px;
}

.article pre {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
}

.footer {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 40px;
}

.footer p {
    font-size: 14px;
    color: #CCCCCC;
}

/* 按钮样式 */
button.highlight {
    background: linear-gradient(45deg, #00BFFF, #FF69B4);
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

button.highlight:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
}

/* 图标样式 */
.icon {
    width: 50px;
    height: 50px;
    background: radial-gradient(circle, #FFFFFF, #E0E0E0);
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2), inset 0 0 4px rgba(255, 255, 255, 0.5);
    position: relative;
    margin-bottom: 10px;
}

.icon::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    width: 30px;
    height: 30px;
    background: linear-gradient(45deg, #C0C0C0, #FFFFFF);
    border-radius: 50%;
    box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.2);
}

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

@media (max-width: 1200px) {
    .container {
        grid-template-columns: 1fr 2fr;
    }
}

@media (max-width: 1024px) {
    .container {
        grid-template-columns: 1fr;
    }

    nav ul {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 768px) {
    header, .footer {
        flex-direction: column;
        text-align: center;
    }

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

    .sidebar {
        display: none;
    }

    .main-content {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .main-content h1 {
        font-size: 24px;
    }

    .main-content p, .article p {
        font-size: 14px;
    }

    button.highlight {
        padding: 8px 16px;
        font-size: 14px;
    }
}

@media (max-width: 320px) {
    .main-content h1 {
        font-size: 20px;
    }

    nav ul li a {
        font-size: 14px;
    }

    button.highlight {
        padding: 6px 12px;
        font-size: 12px;
    }
}

