* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "Segoe UI", sans-serif;
    background: #f8f9fa;
    color: #333;
    line-height: 1.6;
    padding-top: 80px; /* 为固定头部留出空间 */
}

.container{
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ========== 头部导航栏 - 水平一列布局 ========== */
.yzm_header {
    display: flex;
    align-items: center;        /* 垂直居中所有元素 */
    justify-content: space-between; /* 左右元素分别靠左/靠右 */
    padding: 12px 20px;
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ========== 左侧：LOGO + 网站名称 ========== */
.yzm_logo {
    display: flex;
    align-items: center;
    gap: 12px; /* LOGO图和文字间距 */
    text-decoration: none;
    color: #1a73e8;
    font-weight: bold;
    font-size: 18px;
    height: 40px; /* 与LOGO高度一致 */
}

/* LOGO图片样式 - 固定大小 */
.yzm_logo img {
    width: 40px;      /* 固定宽度 */
    height: 40px;     /* 固定高度 */
    border-radius: 8px;
    object-fit: cover; /* 保证图片不变形 */
}

/* 网站名称文字 */
.yzm_logo span {
    font-size: 20px;
    font-weight: bold;
    color: #1a73e8;
    display: flex;
    align-items: center;
}
/* ========== 中部：主导航菜单 ========== */
.yzm_nav_container {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    margin: 0 20px; /* 与左右留出间距 */
}

.yzm_nav_children {
    display: flex;
    list-style: none;
    gap: 16px;
    margin: 0;
    padding: 0;
}

.yzm_nav_children li a {
    padding: 8px 12px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.yzm_nav_children li a:hover,
.yzm_nav_children li a.current {
    background-color: #1a73e8;
    color: #fff;
}

/* ========== 右侧功能区 ========== */
.yzm_nav_right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* 签到按钮 */
.yzm_sign a {
    display: block;
    background-color: #1a73e8;
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    min-width: 80px;
    text-align: center;
}


.yzm_sign a:hover {
    background-color: #0d62c9;
}

/* 签到下拉菜单 */
.yzm_sign_in_dropdown {
    position: relative;
    display: inline-block;
}

.yzm_sign_in_dropdown_content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 6px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 160px;
    z-index: 10;
    padding: 12px 10px;
    font-size: 14px;
    color: #333;
    
    text-align: center;
}

.yzm_sign_in_dropdown:hover .yzm_sign_in_dropdown_content {
    display: block;
}

.yzm_sign_in_dropdown_content p {
    margin: 6px 0;
    font-weight: bold;
    color: #1a73e8;
}

.yzm_sign_in_dropdown_content a {
    display: block;
    padding: 6px 0;
    color: #1a73e8;
    text-decoration: none;
    font-size: 13px;
}

.yzm_sign_in_dropdown_content a:hover {
    text-decoration: underline;
    background-color: #f5f5f5;
    border-radius: 4px;
}
/* 登录/注册按钮 */
.yzm_nav_right a.login,
.yzm_nav_right a.register {
    padding: 8px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.yzm_nav_right a.login:hover,
.yzm_nav_right a.register:hover {
    background-color: #f0f0f0;
    border-color: #999;
}

/* 用户登录状态（昵称+头像） */
.yzm_login_status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #333;
    
}

.yzm_login_status img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #1a73e8;
}

/* ========== 规则说明弹窗 ========== */
#rule-modal {
    display: none;
    position: fixed;
    z-index: 1002;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}
#rule-modal-content {
    background-color: #fff;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 450px;
    max-height: 80vh;
    overflow-y: auto;
    animation: scaleIn 0.3s ease;
}

#rule-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

#rule-modal-title {
    font-size: 18px;
    font-weight: bold;
    color: #1a73e8;
}

#rule-modal-close {
    font-size: 24px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    padding: 0 4px;
}

#rule-modal-close:hover {
    color: #000;
}

#rule-modal-body p {
    margin-bottom: 10px;
    line-height: 1.6;
    color: #555;
    font-size: 14px;
}

/* 弹窗动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* 下拉容器：头像区域作为触发点 */
.dropdown {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

/* 用户名和头像样式 */
.dropdown .user-name {
    margin-right: 8px;
    font-weight: bold;
    color: #333;
}

.dropdown .user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #007bff;
    vertical-align: middle;
    transition: transform 0.2s ease;
}
/* 鼠标悬停时头像微微放大 */
.dropdown:hover .user-avatar {
    transform: scale(1.1);
}

/* 下拉菜单内容 */
.dropdown-content {
    display: none;
    position: absolute;
    top: 100%; /* 菜单在头像下方出现 */
    right: 0;  /* 菜单右对齐头像 */
    width: 100px;
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    overflow: hidden;
    z-index: 1000;
    margin-top: 6px;

    /* 添加过渡效果 */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
/* 当鼠标悬停在 .dropdown 上时显示菜单 */
.dropdown:hover .dropdown-content {
    display: block;
    opacity: 1;
    visibility: visible;
}

/* 下拉菜单列表 */
.dropdown-content .yzm_user_me {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dropdown-content .yzm_user_me li a {
    display: block;
    padding: 8px 10px;
    color: #333;
    text-decoration: none;
    font-size: 13px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* 菜单项悬停效果 */
.dropdown-content .yzm_user_me li a:hover {
    background-color: #f0f7ff;
    color: #007bff;
}

.dropdown-content .yzm_user_me li a {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* 菜单项悬停效果 */
.dropdown-content .yzm_user_me li a:hover {
    background-color: #f0f7ff;
    color: #007bff;
}

/* 鼠标悬停在头像区域时，显示下拉菜单 */
.dropdown:hover .dropdown-content {
    display: block;
}
/* ========== 响应式调整 ========== */
@media (max-width: 768px) {
    .yzm_header {
        flex-wrap: wrap;
        padding: 10px;
    }
    .yzm_nav_container {
        order: 2;
        width: 100%;
        margin-top: 10px;
    }
    .yzm_nav_children {
        justify-content: center;
    }
    .yzm_nav_right {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }
    .yzm_logo {
        order: 1;
    }
}
/* 导航子菜单 */
.yzm_nav_children {
    list-style: none;
    display: flex;
    gap: 15px;
    margin: 0;
    padding: 0;
}
.yzm_nav_children li a {
    padding: 8px 15px;
    margin: 0;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
}
.yzm_nav_children li a:hover,
.yzm_nav_children li a.current {
    background: #1a73e8;
    color: #fff;
}
/* 右侧导航元素 */
.yzm_nav_right {
    display: flex;
    align-items: center;
    font-size: 14px;
}
.yzm_nav_right a {
    color: #333;
    text-decoration: none;
    margin: 0 15px;
    vertical-align: middle;
}
.yzm_nav_right a:hover { color: #1a73e8; }

/* 用户头像状态 */
.yzm_login_status {
    display: inline-block;
    margin-left: 15px;
}
.yzm_login_status img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    vertical-align: middle;
    margin-left: 5px;
}
/* ========== 每日签到下拉样式 ========== */
.yzm_sign_in_dropdown {
    position: relative;
    display: inline-block;
    margin: 0 15px;
}
.yzm_sign a {
    display: inline-block;
    background: #1a73e8;
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    vertical-align: middle;
}
.yzm_sign a:hover {
    background: #0d62c9;
}
.yzm_sign_in_dropdown_content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    right: 0;
    top: 100%;
    
    margin-top: 5px;
    border-radius: 4px;
    padding: 10px;
}
.yzm_sign_in_dropdown:hover .yzm_sign_in_dropdown_content {
    display: block;
}
.yzm_sign_in_dropdown_content p {
    color: #333;
    padding: 8px 0;
    margin: 0;
    font-size: 14px;
}
.yzm_sign_in_dropdown_content p:first-child {
    font-weight: bold;
    color: #1a73e8;
}
.yzm_sign_in_dropdown_content a {
    color: #1a73e8;
    text-decoration: none;
    font-size: 12px;
}
.yzm_sign_in_dropdown_content a:hover {
    text-decoration: underline;
}
/* ========== 规则说明弹窗样式 ========== */
#rule-modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}
#rule-modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 60%;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
#rule-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
        border-bottom: 1px solid #eee;
}
#rule-modal-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}
#rule-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
#rule-modal-close:hover,
#rule-modal-close:focus {
    color: #000;
    text-decoration: none;
}
#rule-modal-body {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}
/* ========== 子导航（二级导航） ========== */
.yzm_header_children {
    background: #f1f3f4;
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
}
.yzm_nav_children {
    list-style: none;
    display: flex;
    gap: 15px;
    margin: 0;
    padding: 0;
}
.yzm_nav_children li {
    margin: 0;
}
.yzm_nav_children li a {
    padding: 8px 15px;
    margin: 0;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
}
.yzm_nav_children li a:hover,
.yzm_nav_children li a.current {
    background: #1a73e8;
    color: #fff;
    
}

.yzm_release {
    padding: 10px 20px;
    background: #1a73e8;
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 16px;
}
.yzm_release a {
    background: #1a73e8;
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    margin-left: 10px;
}
.yzm_release a:hover { background: #0d62c9; }
