/* PC 打包页用户登录态模块样式 */

.pc-user-state {
    display: inline-flex;
    align-items: center;
    margin-left: 20px;
}

/* 未登录状态 - 登录/注册按钮 */
.pc-user-state .pc-user-login,
.pc-user-state .pc-user-register {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    padding: 0 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: all 200ms;
    white-space: nowrap;
}

.pc-user-state .pc-user-login {
    color: #333;
    border: 1px solid #B5B5B5;
    background: transparent;
}

.pc-user-state .pc-user-login:hover {
    border-color: #0052d9;
    color: #0052d9;
}

.pc-user-state .pc-user-register {
    color: #fff;
    background: #0052d9;
    border: 1px solid #0052d9;
    margin-left: 10px;
}

.pc-user-state .pc-user-register:hover {
    opacity: 0.8;
}

/* 已登录状态 - 用户头像 */
.pc-user-profile {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 40px;
}

.pc-user-avatar {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    outline: none;
}

.pc-user-avatar img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

.pc-user-avatar .pc-arrowhead {
    width: 12px;
    height: 8px;
    margin-left: 8px;
    transition: transform 200ms;
}

.pc-user-profile:hover .pc-arrowhead {
    transform: rotate(180deg);
}

/* 用户弹窗 */
.pc-user-popup {
    position: absolute;
    top: 40px;
    right: -20px;
    width: 198px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    overflow: hidden;
}

.pc-user-profile:hover .pc-user-popup {
    display: block;
}

.pc-user-popup .pc-popup-trigon {
    position: absolute;
    top: -6px;
    right: 30px;
    width: 12px;
    height: 12px;
    background: #fff;
    transform: rotate(45deg);
    box-shadow: -2px -2px 3px rgba(0, 0, 0, 0.1);
}

/* 用户信息区域 */
.pc-user-info {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #EEEEEE;
}

.pc-user-info img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
}

.pc-user-info .pc-user-name {
    font-size: 14px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 120px;
}

/* 菜单项 */
.pc-user-popup .pc-popup-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #333;
    font-size: 14px;
    text-decoration: none;
    transition: color 200ms;
    cursor: pointer;
}

.pc-user-popup .pc-popup-link:hover {
    color: #0052d9;
    background: #f8f9ff;
}

.pc-user-popup .pc-popup-link:first-of-type {
    margin-top: 8px;
}

/* 退出按钮 */
.pc-user-popup .pc-logout-btn {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 12px 20px;
    color: #999;
    font-size: 14px;
    border: none;
    background: none;
    cursor: pointer;
    width: 100%;
    text-align: right;
    transition: color 200ms;
}

.pc-user-popup .pc-logout-btn:hover {
    color: #0052d9;
}

/* 默认头像图标 */
.pc-default-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}
