
/* 基础样式 */
body {
    margin: 0;
    font-family: 'Montserrat', sans-serif, Arial, Helvetica, sans-serif;
    background: linear-gradient(135deg, #784D0F, #4B5320, #6A5ACD);
    background-size: 300% 300%;
    animation: gradientBG 15s ease infinite;
    color: #fff;
    line-height: 1.6;
}
@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
    max-width: 1440px;
    margin: 0 auto;
}
@media (min-width: 768px) {
    .container {
        grid-template-columns: 2fr 1fr;
    }
}

/* 标题与导航栏 */
header {
    background: linear-gradient(to right, #C0C0C0, #FFD700);
    padding: 20px;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}
header h1 {
    font-family: 'Bodoni', serif;
    font-size: 2.5rem;
    color: #4B5320;
    margin: 0;
}
header::after {
    content: "这是一个网页样式设计参考";
    display: block;
    font-size: 0.9rem;
    color: #6A5ACD;
    margin-top: 10px;
}

/* 主体内容区域 */
.main-content {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
.main-content h2, .main-content h3 {
    color: #FFD700;
    margin-top: 20px;
}
.main-content p {
    font-family: 'Bodoni', serif;
    font-size: 1rem;
    line-height: 1.6;
    letter-spacing: 0.05em;
    color: #fff;
}
.main-content ul, .main-content ol {
    padding-left: 20px;
    color: #39FF14;
}
.main-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}
.main-content th, .main-content td {
    border: 1px solid #C0C0C0;
    padding: 10px;
    text-align: left;
}
.main-content th {
    background-color: #6A5ACD;
    color: #fff;
}
.main-content pre {
    background: #4B5320;
    color: #39FF14;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
}
.main-content code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
}

/* 侧边栏 */
.sidebar {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
.sidebar img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 15px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}
.sidebar img:hover {
    opacity: 1;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in {
    animation: fadeIn 1s ease forwards;
}

/* 响应式布局 */
@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
    }
    header h1 {
        font-size: 2rem;
    }
    .main-content pre {
        font-size: 0.8rem;
    }
}

/* 按钮悬停效果 */
.button {
    position: relative;
    display: inline-block;
    background: #FFD700;
    color: #4B5320;
    padding: 10px 20px;
    border-radius: 5px;
    overflow: hidden;
    transition: background 0.3s ease;
}
.button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 215, 0, 0.5);
    animation: scan 2s linear infinite;
}
.button:hover {
    background: #39FF14;
}
@keyframes scan {
    0% { left: -100%; }
    100% { left: 100%; }
}

