
/* 全局样式设置 */
body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    color: #ffffff;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 31, 63, 0.9);
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}
.navbar a {
    color: #ffffff;
    text-decoration: none;
    margin: 0 15px;
    position: relative;
}
.navbar a:hover {
    color: #ff7f50;
}
.navbar .dropdown {
    position: relative;
    display: inline-block;
}
.navbar .dropdown-content {
    display: none;
    position: absolute;
    background-color: #304a70;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    border-radius: 5px;
}
.navbar .dropdown-content a {
    color: #ffffff;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}
.navbar .dropdown-content a:hover {
    background-color: #406080;
}
.navbar .dropdown:hover .dropdown-content {
    display: block;
}

/* 主要内容区域 */
.main {
    padding: 120px 40px 40px 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 40px;
}
.section {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.section:hover {
    transform: translateY(-10px);
    box-shadow: 0 16px 32px rgba(0,0,0,0.4);
}
.section img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}
.section img:hover {
    transform: scale(1.05);
}
.section h2, .section h3, .section h4 {
    color: #ff7f50;
}
.section pre {
    background: #002b5c;
    padding: 15px;
    border-radius: 5px;
    overflow: auto;
}
.section pre code {
    color: #00ffea;
    font-family: 'Courier New', Courier, monospace;
}
.section pre::before {
    content: "CSS3 示例代码";
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #ff7f50;
}
.footer {
    background: rgba(0, 31, 63, 0.9);
    padding: 40px;
    text-align: center;
}
.footer a {
    color: #ff7f50;
    text-decoration: none;
    margin: 0 10px;
}
.footer a:hover {
    text-decoration: underline;
}

/* 响应式设计调整 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }
    .main {
        grid-template-columns: 1fr;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.section {
    animation: fadeIn 2s ease-in;
}

/* 强调提示 */
.highlight {
    color: #ff7f50;
    font-weight: bold;
}

/* 提示信息样式 */
.notice {
    background: rgba(255, 127, 80, 0.2);
    padding: 20px;
    border-left: 5px solid #ff7f50;
    margin-bottom: 40px;
    border-radius: 5px;
}

