/* ================
   基础样式重置
================ */

/* 重置默认边距和填充 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 基础字体和行高设置 */
body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #212121;
    background-color: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 链接基础样式 */
a {
    color: #1B5E20;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #2E7D32;
    text-decoration: underline;
}

/* 列表基础样式 */
ul {
    list-style: none;
}

/* 图片基础样式 */
img {
    max-width: 100%;
    height: auto;
}

/* 容器最大宽度和自动边距 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

/* 卡片基础样式 */
.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* 按钮基础样式 */
.btn {
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
    display: inline-block;
    text-align: center;
}

.btn:hover {
    opacity: 0.9;
}

.btn-primary {
    background-color: #1B5E20;
    color: white;
}

.btn-primary:hover {
    background-color: #2E7D32;
}

.btn-secondary {
    background-color: #f5f5f5;
    color: #212121;
}

.btn-secondary:hover {
    background-color: #e0e0e0;
}

.btn-danger {
    background-color: #c62828;
    color: white;
}

.btn-danger:hover {
    background-color: #d32f2f;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
}

.btn-large {
    padding: 12px 24px;
    font-size: 16px;
}

.btn-block {
    display: block;
    width: 100%;
}

/* 表单控件基础样式 */
.form-control {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
    width: 100%;
}

.form-control:focus {
    outline: none;
    border-color: #1B5E20;
    box-shadow: 0 0 0 2px rgba(27, 94, 32, 0.2);
}

/* 表单组和标签样式 */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.required {
    color: #e53935;
}

.hint {
    color: #757575;
    font-size: 14px;
    margin-top: 4px;
    display: block;
}

/* 面包屑导航样式 */
.breadcrumbs {
    padding: 16px 0;
    color: #757575;
    font-size: 14px;
}

.breadcrumbs a {
    color: #1B5E20;
}

.breadcrumbs span {
    margin: 0 4px;
    color: #bdbdbd;
}

/* 章节标题样式 */
.section-title {
    font-size: 24px;
    color: #212121;
    margin-bottom: 24px;
    position: relative;
    padding-bottom: 8px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: #1B5E20;
}

/* 页头样式 */
header {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 28px;
    color: #1B5E20;
    font-weight: bold;
}

nav ul {
    display: flex;
    align-items: center;
    gap: 24px;
}

nav ul li a {
    color: #212121;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li a:hover, nav ul li a.active {
    color: #1B5E20;
}

/* 用户菜单样式 */
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #4CAF50;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    cursor: pointer;
    position: relative;
}

.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: white;
    min-width: 160px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 8px 0;
    z-index: 1000;
    /* 将margin-top: 8px;改为padding-top: 8px;或完全移除 */
    padding-top: 8px;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-item {
    padding: 12px 16px;
    display: block;
    color: #212121;
    text-decoration: none;
    transition: background-color 0.3s;
}

.dropdown-item:hover {
    background-color: #f5f5f5;
}

/* 页脚样式 */
footer {
    text-align: center;
    padding: 24px;
    color: #757575;
    font-size: 14px;
    margin-top: 40px;
    border-top: 1px solid #eee;
    margin-top: auto;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    nav ul {
        gap: 16px;
        font-size: 14px;
    }
    
    .section-title {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 12px 16px;
        flex-direction: column;
        align-items: flex-start;
    }
    
    nav {
        margin-top: 12px;
        width: 100%;
    }
    
    nav ul {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    footer {
        padding: 20px 16px;
    }
}


/* =====================
   信息提示框样式
===================== */

.info-box {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    color: #856404;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-box p {
    margin: 0;
}