
/* 基础样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Open Sans', sans-serif; /* 使用易读的无衬线字体 */
    background: linear-gradient(135deg, #0d1b2a, #1b263b); /* 主色调渐变背景 */
    color: #ffffff;
    line-height: 1.6;
}

/* 响应式容器 */
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

/* 固定导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(13, 27, 42, 0.8);
    backdrop-filter: blur(5px);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

.navbar ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

.navbar ul li {
    position: relative;
}

.navbar ul li a {
    text-decoration: none;
    color: #ffffff;
    transition: color 0.3s;
}

.navbar ul li a:hover {
    color: #ff5722; /* 点缀色用于悬停效果 */
}

.navbar ul li ul {
    display: none;
    position: absolute;
    top: 35px;
    left: 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border-radius: 5px;
    padding: 10px 0;
}

.navbar ul li:hover ul {
    display: block;
}

.navbar ul li ul li {
    padding: 10px 20px;
}

.navbar ul li ul li a:hover {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
}

/* 主内容样式 */
main {
    max-width: 1200px;
    width: 100%;
    margin-top: 80px; /* 避免内容被导航栏遮挡 */
}

h2, h3 {
    font-family: 'Roboto', sans-serif; /* 标题使用现代感强的无衬线字体 */
    color: #ffffff;
}

h2 {
    font-size: 24px;
    margin-bottom: 20px;
}

h3 {
    font-size: 20px;
    margin-top: 20px;
    margin-bottom: 15px;
}

p {
    font-size: 16px;
    margin-bottom: 15px;
    color: #dddddd;
}

/* 代码块样式 */
pre code {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    display: block;
    overflow: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Courier New', Courier, monospace;
    color: #00ff90;
    margin-bottom: 15px;
}

pre code::before {
    content: "CSS3代码示例";
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #ff5722;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

table th, table td {
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px;
    text-align: left;
}

table th {
    background: rgba(255, 87, 34, 0.3);
}

table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.05);
}

/* 图片装饰样式 */
.decoration-img {
    width: 320px;
    height: 320px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
    margin: 10px;
}

.decoration-img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

/* 微交互与动画 */
.card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.fade-in {
    animation: fadeIn 1s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 视觉引导区样式 */
.intro-section {
    text-align: center;
    padding: 50px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 40px;
    position: relative;
}

.intro-section::after {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, #ff5722, transparent);
}

.intro-section h1 {
    font-size: 28px;
    margin-bottom: 10px;
    color: #ff5722; /* 点缀色突出标题 */
}

.intro-section p {
    font-size: 18px;
    color: #ffffff;
}

/* 折叠区域样式 */
.details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.details.open {
    max-height: 1000px; /* 足够容纳内容 */
}

.toggle-button {
    background: #ff5722;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.toggle-button:hover {
    background: #e64a19;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar ul {
        flex-direction: column;
        background: rgba(13, 27, 42, 0.9);
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        display: none;
    }

    .navbar ul.active {
        display: flex;
    }

    .navbar ul li {
        width: 100%;
        text-align: center;
        padding: 15px 0;
    }

    .intro-section {
        padding: 30px 10px;
    }

    .decoration-img {
        width: 100%;
        height: auto;
    }
}

/* 提示信息样式 */
.reference-note {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-left: 5px solid #ff5722;
    margin-bottom: 30px;
    border-radius: 5px;
    font-size: 18px;
}

